From 68539758579b3bd1f07fb9e1d800e7875db76c5c Mon Sep 17 00:00:00 2001 From: Jeff King Date: Sat, 15 Dec 2012 12:46:43 -0500 Subject: [PATCH] completion: complete refs for "git commit -c" The "-c" and "-C" options take an existing commit, so let's complete refs, just as we would for --squash or --fixup. Signed-off-by: Jeff King Signed-off-by: Junio C Hamano --- contrib/completion/git-completion.bash | 7 +++++++ 1 file changed, 7 insertions(+) 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 -- 2.11.4.GIT