Skip to content

Commit

Permalink
completion: complete refs for "git commit -c"
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Jeff King authored and Junio C Hamano committed Dec 15, 2012
1 parent 790c83c commit 6853975
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions contrib/completion/git-completion.bash
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 6853975

Please sign in to comment.