From f80fe2dfe9dffc512fe76931879087a3ed6d6fa8 Mon Sep 17 00:00:00 2001 From: Oliver Kiddle Date: Wed, 16 Aug 2017 23:40:57 +0200 Subject: 41552: complete only branches after git worktree add --detach the --detach is superfluous for other commits --- Completion/Unix/Command/_git | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Completion/Unix/Command') diff --git a/Completion/Unix/Command/_git b/Completion/Unix/Command/_git index 518e6d198..26554de05 100644 --- a/Completion/Unix/Command/_git +++ b/Completion/Unix/Command/_git @@ -2027,9 +2027,9 @@ _git-worktree() { case $line[1] in (add) if (( $words[(I)--detach] )); then - args=( ':commit:__git_commits' ) - else args=( ':branch:__git_branch_names' ) + else + args=( ':commit:__git_commits' ) fi _arguments \ '(-f --force)'{-f,--force}'[checkout branch even if already checked out in another worktree]' \ -- cgit 1.4.1