Thread (135 messages) 135 messages, 9 authors, 2020-03-17

[PATCH 11/15] contrib: change the prompt for am-based rebases

STALE2393d

From: Elijah Newren via GitGitGadget <hidden>
Date: 2019-12-20 17:10:09
Subsystem: the rest · Maintainer: Linus Torvalds

From: Elijah Newren <redacted>

The prompt for am-based rebases was REBASE, while for interactive-based
rebases was REBASE-i.  A while ago, we switched merge-based rebases from
using REBASE-m to REBASE-i via re-implementing the merge backend based
on the interactive backend.  We will soon be changing the default rebase
backend to the interactive one, meaning the default prompt will be
REBASE-i rather than REBASE.  We have also noted in the documentation
that currently am-specific options will be implemented in the
interactive backend, and even the --am flag may eventually imply an
interactive-based rebase.  As such, change the prompt for an am-based
rebase from REBASE to REBASE-a.

Signed-off-by: Elijah Newren <redacted>
---
 contrib/completion/git-prompt.sh | 2 +-
 t/t9903-bash-prompt.sh           | 6 +++---
 2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/contrib/completion/git-prompt.sh b/contrib/completion/git-prompt.sh
index 1d510cd47b..3c81099d60 100644
--- a/contrib/completion/git-prompt.sh
+++ b/contrib/completion/git-prompt.sh
@@ -440,7 +440,7 @@ __git_ps1 ()
 			__git_eread "$g/rebase-apply/last" total
 			if [ -f "$g/rebase-apply/rebasing" ]; then
 				__git_eread "$g/rebase-apply/head-name" b
-				r="|REBASE"
+				r="|REBASE-a"
 			elif [ -f "$g/rebase-apply/applying" ]; then
 				r="|AM"
 			else
diff --git a/t/t9903-bash-prompt.sh b/t/t9903-bash-prompt.sh
index 88bc733ad6..8da5b1aee2 100755
--- a/t/t9903-bash-prompt.sh
+++ b/t/t9903-bash-prompt.sh
@@ -189,11 +189,11 @@ test_expect_success 'prompt - rebase merge' '
 	test_cmp expected "$actual"
 '
 
-test_expect_success 'prompt - rebase' '
-	printf " (b2|REBASE 1/3)" >expected &&
+test_expect_success 'prompt - rebase am' '
+	printf " (b2|REBASE-a 1/3)" >expected &&
 	git checkout b2 &&
 	test_when_finished "git checkout master" &&
-	test_must_fail git rebase b1 b2 &&
+	test_must_fail git rebase --am b1 b2 &&
 	test_when_finished "git rebase --abort" &&
 	__git_ps1 >"$actual" &&
 	test_cmp expected "$actual"
-- 
gitgitgadget
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help