From: Jeff King Date: Sat, 15 Dec 2012 17:46:43 +0000 (-0500) Subject: completion: complete refs for "git commit -c" X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=68539758579b3bd1f07fb9e1d800e7875db76c5c;p=git.git 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 --- diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash index 0b77eb1fa..a4c48e179 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