summaryrefslogtreecommitdiff
path: root/contrib/completion
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2013-01-05 23:41:53 -0800
committerLibravatar Junio C Hamano <gitster@pobox.com>2013-01-05 23:41:53 -0800
commitd2638e1561012e0f5b473ab43ef76c4ff0d12a9f (patch)
tree4eeb91aea28e8baa7a50b433e2b5590f283c3a83 /contrib/completion
parentMerge branch 'ja/directory-attrs' (diff)
parentcompletion: complete refs for "git commit -c" (diff)
downloadtgif-d2638e1561012e0f5b473ab43ef76c4ff0d12a9f.tar.xz
Merge branch 'jk/complete-commit-c'
Complete "git commmit -c foo<TAB>" into a refname that begins with "foo". * jk/complete-commit-c: completion: complete refs for "git commit -c"
Diffstat (limited to 'contrib/completion')
-rw-r--r--contrib/completion/git-completion.bash7
1 files changed, 7 insertions, 0 deletions
diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash
index 0b77eb1fa4..a4c48e179e 100644
--- a/contrib/completion/git-completion.bash
+++ b/contrib/completion/git-completion.bash
@@ -971,6 +971,13 @@ _git_commit ()
{
__git_has_doubledash && return
+ case "$prev" in
+ -c|-C)
+ __gitcomp_nl "$(__git_refs)" "" "${cur}"
+ return
+ ;;
+ esac
+
case "$cur" in
--cleanup=*)
__gitcomp "default strip verbatim whitespace