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>

Jeff King committed Feb 2, 2021 at 04:02 UTC a534cf4f4d5ac58b91112fc12478d8a32e348152
1 file changed +1 -1
contrib/completion/git-completion.bash
+1 -1
@@ -1438,7 +1438,7 @@ _git_branch ()
1438 while [ $c -lt $cword ]; do
1439 i="${words[c]}"
1440 case "$i" in
1441 - -d|--delete|-m|--move) only_local_ref="y" ;;
1441 + -d|--delete|-D|-m|--move) only_local_ref="y" ;;
1442 -r|--remotes) has_r="y" ;;
1443 esac
1444 ((c++))