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 <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Jeff King committed Dec 15, 2012 at 12:46 UTC 68539758579b3bd1f07fb9e1d800e7875db76c5c
1 file changed +7
contrib/completion/git-completion.bash
+7
@@ -971,6 +971,13 @@ _git_commit ()
971 {
972 __git_has_doubledash && return
973
974 + case "$prev" in
975 + -c|-C)
976 + __gitcomp_nl "$(__git_refs)" "" "${cur}"
977 + return
978 + ;;
979 + esac
980 +
981 case "$cur" in
982 --cleanup=*)
983 __gitcomp "default strip verbatim whitespace