Merge branch 'rj/complete-worktree-paths-fix'

The logic to complete the command line arguments to "git worktree"
subcommand (in contrib/) has been updated to correctly honor things
like "git -C dir" etc.

* rj/complete-worktree-paths-fix:
  completion: fix __git_complete_worktree_paths
This commit is contained in:
Junio C Hamano
2024-03-14 14:05:25 -07:00
2 changed files with 24 additions and 1 deletions

View File

@ -3629,7 +3629,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')"
}