Merge branch 'fc/show-branch-in-rebase-am'
The bash prompt code (in contrib/) displayed the name of the branch being rebased when "rebase -i/-m/-p" modes are in use, but not the plain vanilla "rebase". * fc/show-branch-in-rebase-am: prompt: fix for simple rebase
This commit is contained in:
commit
5adb374101
@ -360,6 +360,7 @@ __git_ps1 ()
|
|||||||
step=$(cat "$g/rebase-apply/next")
|
step=$(cat "$g/rebase-apply/next")
|
||||||
total=$(cat "$g/rebase-apply/last")
|
total=$(cat "$g/rebase-apply/last")
|
||||||
if [ -f "$g/rebase-apply/rebasing" ]; then
|
if [ -f "$g/rebase-apply/rebasing" ]; then
|
||||||
|
b="$(cat "$g/rebase-apply/head-name")"
|
||||||
r="|REBASE"
|
r="|REBASE"
|
||||||
elif [ -f "$g/rebase-apply/applying" ]; then
|
elif [ -f "$g/rebase-apply/applying" ]; then
|
||||||
r="|AM"
|
r="|AM"
|
||||||
@ -376,6 +377,7 @@ __git_ps1 ()
|
|||||||
r="|BISECTING"
|
r="|BISECTING"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
test -n "$b" ||
|
||||||
b="$(git symbolic-ref HEAD 2>/dev/null)" || {
|
b="$(git symbolic-ref HEAD 2>/dev/null)" || {
|
||||||
detached=yes
|
detached=yes
|
||||||
b="$(
|
b="$(
|
||||||
|
@ -276,7 +276,7 @@ test_expect_success 'prompt - rebase merge' '
|
|||||||
'
|
'
|
||||||
|
|
||||||
test_expect_success 'prompt - rebase' '
|
test_expect_success 'prompt - rebase' '
|
||||||
printf " ((t2)|REBASE 1/3)" > expected &&
|
printf " (b2|REBASE 1/3)" > expected &&
|
||||||
git checkout b2 &&
|
git checkout b2 &&
|
||||||
test_when_finished "git checkout master" &&
|
test_when_finished "git checkout master" &&
|
||||||
test_must_fail git rebase b1 b2 &&
|
test_must_fail git rebase b1 b2 &&
|
||||||
|
Loading…
Reference in New Issue
Block a user