summaryrefslogtreecommitdiff
path: root/contrib/completion
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2021-02-12 22:21:04 (GMT)
committerJunio C Hamano <gitster@pobox.com>2021-02-12 22:21:04 (GMT)
commit006c5f79be55c029d6f68ea0d5a33cb41d1b5e80 (patch)
tree79a0fbcf86b3d25dc2480893b764194358fb3c01 /contrib/completion
parent60f81219403d708ab6271f68d8e4e42a39f7459b (diff)
parent27dc071b9a11e953ea7d73bfdf6103940d039215 (diff)
downloadgit-006c5f79be55c029d6f68ea0d5a33cb41d1b5e80.zip
git-006c5f79be55c029d6f68ea0d5a33cb41d1b5e80.tar.gz
git-006c5f79be55c029d6f68ea0d5a33cb41d1b5e80.tar.bz2
Merge branch 'jk/complete-branch-force-delete'
The command line completion (in contrib/) completed "git branch -d" with branch names, but "git branch -D" offered tagnames in addition, which has been corrected. "git branch -M" had the same problem. * jk/complete-branch-force-delete: doc/git-branch: fix awkward wording for "-c" completion: handle other variants of "branch -m" completion: treat "branch -D" the same way as "branch -d"
Diffstat (limited to 'contrib/completion')
-rw-r--r--contrib/completion/git-completion.bash6
1 files changed, 4 insertions, 2 deletions
diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash
index 4b1f426..7dc6cd8 100644
--- a/contrib/completion/git-completion.bash
+++ b/contrib/completion/git-completion.bash
@@ -1447,8 +1447,10 @@ _git_branch ()
while [ $c -lt $cword ]; do
i="${words[c]}"
case "$i" in
- -d|--delete|-m|--move) only_local_ref="y" ;;
- -r|--remotes) has_r="y" ;;
+ -d|-D|--delete|-m|-M|--move|-c|-C|--copy)
+ only_local_ref="y" ;;
+ -r|--remotes)
+ has_r="y" ;;
esac
((c++))
done