From: Jeff King Date: Tue, 2 Feb 2021 09:02:13 +0000 (-0500) Subject: completion: treat "branch -D" the same way as "branch -d" X-Git-Tag: v2.31.0-rc0~50^2~2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=a534cf4f4d5ac58b91112fc12478d8a32e348152;p=thirdparty%2Fgit.git 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 Signed-off-by: Jeff King Signed-off-by: Junio C Hamano --- diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash index 463a3124da..ba950a247d 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++))