summaryrefslogtreecommitdiff
path: root/contrib/completion/git-completion.bash
diff options
context:
space:
mode:
authorJeff King <peff@peff.net>2021-02-02 09:02:13 (GMT)
committerJunio C Hamano <gitster@pobox.com>2021-02-02 21:26:10 (GMT)
commita534cf4f4d5ac58b91112fc12478d8a32e348152 (patch)
tree57781da84ec100024787860bf4b283bf7caeb396 /contrib/completion/git-completion.bash
parent71ca53e8125e36efbda17293c50027d31681a41f (diff)
downloadgit-a534cf4f4d5ac58b91112fc12478d8a32e348152.zip
git-a534cf4f4d5ac58b91112fc12478d8a32e348152.tar.gz
git-a534cf4f4d5ac58b91112fc12478d8a32e348152.tar.bz2
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 <paul@myitcv.io> Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'contrib/completion/git-completion.bash')
-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 463a312..ba950a2 100644
--- a/contrib/completion/git-completion.bash
+++ b/contrib/completion/git-completion.bash
@@ -1438,7 +1438,7 @@ _git_branch ()
while [ $c -lt $cword ]; do
i="${words[c]}"
case "$i" in
- -d|--delete|-m|--move) only_local_ref="y" ;;
+ -d|--delete|-D|-m|--move) only_local_ref="y" ;;
-r|--remotes) has_r="y" ;;
esac
((c++))