Code

bash: Support git-rebase -m continuation completion.
authorShawn O. Pearce <spearce@spearce.org>
Mon, 5 Feb 2007 04:52:02 +0000 (23:52 -0500)
committerJunio C Hamano <junkio@cox.net>
Tue, 6 Feb 2007 03:09:40 +0000 (19:09 -0800)
Apparently `git-rebase -m` uses a metadata directory within .git
(.git/.dotest-merge) rather than .dotest used by git-am (and
git-rebase without the -m option).  This caused the completion code
to not offer --continue, --skip or --abort when working within a
`git-rebase -m` session.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
contrib/completion/git-completion.bash

index 430e6367a7d944f59a986df442e389d27f41927c..b0ff87d8d0a0afe04770611bd36b437520ef1dbb 100755 (executable)
@@ -675,7 +675,7 @@ _git_push ()
 _git_rebase ()
 {
        local cur="${COMP_WORDS[COMP_CWORD]}"
-       if [ -d .dotest ]; then
+       if [ -d .dotest ] || [ -d .git/.dotest-merge ]; then
                __gitcomp "--continue --skip --abort"
                return
        fi