From d0a499b31053e554e2154ff235d2b1df113068c3 Mon Sep 17 00:00:00 2001 From: reidgould Date: Fri, 27 Sep 2024 14:51:09 -0500 Subject: [PATCH] Fix issue where "git subrepo commit" incorrectly gives error "There is no worktree available". --- lib/git-subrepo | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/git-subrepo b/lib/git-subrepo index cfeeae92..2117ec45 100755 --- a/lib/git-subrepo +++ b/lib/git-subrepo @@ -1231,7 +1231,7 @@ command-setup() { local _worktree _worktree=$( git worktree list | - grep "\[subrepo/$subdir\]" | + grep "\[subrepo/$subref\]" | cut -d ' ' -f1 ) || true if [[ $command =~ ^(commit)$ && -z $_worktree ]]; then