diff options
author | Junio C Hamano <gitster@pobox.com> | 2024-01-03 00:51:29 +0300 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2024-01-03 00:51:29 +0300 |
commit | cce4778520b6ade4bc839fe054500253f7d22570 (patch) | |
tree | 56e9458171772e6730ec578d8c237ab034284218 /t | |
parent | 59a29e1274948bf9a3ef44c65903d09194464e1c (diff) | |
parent | 990adccbdf0d8d1056c49a5ed546e744f542ba8f (diff) |
Merge branch 'rj/status-bisect-while-rebase'
"git status" is taught to show both the branch being bisected and
being rebased when both are in effect at the same time.
* rj/status-bisect-while-rebase:
status: fix branch shown when not only bisecting
Diffstat (limited to 't')
-rwxr-xr-x | t/t7512-status-help.sh | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/t/t7512-status-help.sh b/t/t7512-status-help.sh index c2ab8a444a..802f8f704c 100755 --- a/t/t7512-status-help.sh +++ b/t/t7512-status-help.sh @@ -692,6 +692,34 @@ EOF ' +test_expect_success 'status when bisecting while rebasing' ' + git reset --hard main && + test_when_finished "git rebase --abort" && + ONTO=$(git rev-parse --short HEAD^) && + FAKE_LINES="break" git rebase -i HEAD^ && + test_when_finished "git checkout -" && + git checkout -b bisect_while_rebasing && + test_when_finished "git bisect reset" && + git bisect start && + cat >expected <<EOF && +On branch bisect_while_rebasing +Last command done (1 command done): + break +No commands remaining. +You are currently editing a commit while rebasing branch '\''bisect'\'' on '\''$ONTO'\''. + (use "git commit --amend" to amend the current commit) + (use "git rebase --continue" once you are satisfied with your changes) + +You are currently bisecting, started from branch '\''bisect_while_rebasing'\''. + (use "git bisect reset" to get back to the original branch) + +nothing to commit (use -u to show untracked files) +EOF + git status --untracked-files=no >actual && + test_cmp expected actual +' + + test_expect_success 'status when rebase --apply conflicts with statushints disabled' ' git reset --hard main && git checkout -b statushints_disabled && |