summaryrefslogtreecommitdiff
path: root/contrib
diff options
context:
space:
mode:
authorElijah Newren <newren@gmail.com>2020-02-15 21:36:35 (GMT)
committerJunio C Hamano <gitster@pobox.com>2020-02-16 23:40:42 (GMT)
commit6d04ce75c4dd4bf0aeda7383c4d791daa049c98a (patch)
tree88dc1d70073afcb6e42e86388fa7d9679302e606 /contrib
parent52eb738d6b40bf8816727fcf7f39febc761ef0db (diff)
downloadgit-6d04ce75c4dd4bf0aeda7383c4d791daa049c98a.zip
git-6d04ce75c4dd4bf0aeda7383c4d791daa049c98a.tar.gz
git-6d04ce75c4dd4bf0aeda7383c4d791daa049c98a.tar.bz2
git-prompt: change the prompt for interactive-based rebases
In the past, we had different prompts for different types of rebases: REBASE: for am-based rebases REBASE-m: for merge-based rebases REBASE-i: for interactive-based rebases It's not clear why this distinction was necessary or helpful; when the prompt was added in commit e75201963f67 ("Improve bash prompt to detect various states like an unfinished merge", 2007-09-30), it simply added these three different types. Perhaps there was a useful purpose back then, but there have been some changes: * The merge backend was deleted after being implemented on top of the interactive backend, causing the prompt for merge-based rebases to change from REBASE-m to REBASE-i. * The interactive backend is used for multiple different types of non-interactive rebases, so the "-i" part of the prompt doesn't really mean what it used to. * Rebase backends have gained more abilities and have a great deal of overlap, sometimes making it hard to distinguish them. * Behavioral differences between the backends have also been ironed out. * We want to change the default backend from am to interactive, which means people would get "REBASE-i" by default if we didn't change the prompt, and only if they specified --am or --whitespace or -C would they get the "REBASE" prompt. * In the future, we plan to have "--whitespace", "-C", and even "--am" run the interactive backend once it can handle everything the am-backend can. For all these reasons, make the prompt for any type of rebase just be "REBASE". Signed-off-by: Elijah Newren <newren@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'contrib')
-rw-r--r--contrib/completion/git-prompt.sh6
1 files changed, 1 insertions, 5 deletions
diff --git a/contrib/completion/git-prompt.sh b/contrib/completion/git-prompt.sh
index 1d510cd..014cd7c 100644
--- a/contrib/completion/git-prompt.sh
+++ b/contrib/completion/git-prompt.sh
@@ -429,11 +429,7 @@ __git_ps1 ()
__git_eread "$g/rebase-merge/head-name" b
__git_eread "$g/rebase-merge/msgnum" step
__git_eread "$g/rebase-merge/end" total
- if [ -f "$g/rebase-merge/interactive" ]; then
- r="|REBASE-i"
- else
- r="|REBASE-m"
- fi
+ r="|REBASE"
else
if [ -d "$g/rebase-apply" ]; then
__git_eread "$g/rebase-apply/next" step