aboutsummaryrefslogtreecommitdiffstats
path: root/contrib
diff options
context:
space:
mode:
authorRubén Justo <rjusto@gmail.com>2024-02-27 22:06:49 +0100
committerJunio C Hamano <gitster@pobox.com>2024-02-27 13:37:24 -0800
commit3574816d98a332187fc331826cdf170b0adf3a47 (patch)
treed79245d545ead42c0fd720e22927e8d908563856 /contrib
parent3c2a3fdc388747b9eaf4a4a4f2035c1c9ddb26d0 (diff)
downloadgit-3574816d98a332187fc331826cdf170b0adf3a47.tar.gz
completion: fix __git_complete_worktree_paths
Use __git to invoke "worktree list" in __git_complete_worktree_paths, to respect any "-C" and "--git-dir" options present on the command line. Signed-off-by: Rubén Justo <rjusto@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'contrib')
-rw-r--r--contrib/completion/git-completion.bash2
1 files changed, 1 insertions, 1 deletions
diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash
index 444b3efa63..86e55dc67f 100644
--- a/contrib/completion/git-completion.bash
+++ b/contrib/completion/git-completion.bash
@@ -3571,7 +3571,7 @@ __git_complete_worktree_paths ()
# Generate completion reply from worktree list skipping the first
# entry: it's the path of the main worktree, which can't be moved,
# removed, locked, etc.
- __gitcomp_nl "$(git worktree list --porcelain |
+ __gitcomp_nl "$(__git worktree list --porcelain |
sed -n -e '2,$ s/^worktree //p')"
}