threads / patch / 6683

patch, 2 partsbash: Support git-rebase -m continuation completion.

Subject: [PATCH 1/2] bash: Support git-rebase -m continuation completion.

## tl;dr

One message between Feb 5, 2007 and Feb 5, 2007. Diffs are folded; open one to read it.

replies: 0people: 1as markdown or json

Shawn O. Pearce· Feb 5, 2007, 04:52 UTC · lore

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>
---
 contrib/completion/git-completion.bash |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
Show changes to contrib/completion/git-completion.bash +1 −1
diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash
index 466cc32..5f9a34b 100755
--- a/contrib/completion/git-completion.bash
+++ b/contrib/completion/git-completion.bash
@@ -627,7 +627,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
-- 
1.5.0.rc3.39.gec804

← back to recent threads