From: Jeff King Date: Sat, 15 Dec 2012 17:46:43 +0000 (-0500) Subject: completion: complete refs for "git commit -c" X-Git-Tag: v1.8.1.1~1^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=685397585;p=thirdparty%2Fgit.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 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