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: https://git.lorimer.id.au/gitweb.git/diff_plain/68539758579b3bd1f07fb9e1d800e7875db76c5c?ds=inline;hp=--cc 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 --- 68539758579b3bd1f07fb9e1d800e7875db76c5c 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