Skip to content

Commit a534cf4

Browse files
peffgitster
authored andcommitted
completion: treat "branch -D" the same way as "branch -d"
The former offers not just branches but tags as completion candidates. Mimic how "branch -d" limits its suggestion to branch names. Reported-by: Paul Jolly <[email protected]> Signed-off-by: Jeff King <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 71ca53e commit a534cf4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

contrib/completion/git-completion.bash

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1438,7 +1438,7 @@ _git_branch ()
14381438
while [ $c -lt $cword ]; do
14391439
i="${words[c]}"
14401440
case "$i" in
1441-
-d|--delete|-m|--move) only_local_ref="y" ;;
1441+
-d|--delete|-D|-m|--move) only_local_ref="y" ;;
14421442
-r|--remotes) has_r="y" ;;
14431443
esac
14441444
((c++))

0 commit comments

Comments
 (0)