projects
/
git.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
790c83c
)
completion: complete refs for "git commit -c"
author
Jeff King
<peff@peff.net>
Sat, 15 Dec 2012 17:46:43 +0000
(12:46 -0500)
committer
Junio C Hamano
<gitster@pobox.com>
Sat, 15 Dec 2012 18:48:06 +0000
(10:48 -0800)
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>
contrib/completion/git-completion.bash
patch
|
blob
|
history
diff --git
a/contrib/completion/git-completion.bash
b/contrib/completion/git-completion.bash
index 0b77eb1fa4074fb8ed5ef4cd4c37513f49804e7e..a4c48e179eb778077462a812b491e762e284486c 100644
(file)
--- 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