diff options
| author | Junio C Hamano <gitster@pobox.com> | 2019-05-13 23:50:35 +0900 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2019-05-13 23:50:35 +0900 |
| commit | b51a0fdc3822c2ef260f6d496b6df6d33b101e8a (patch) | |
| tree | 62b916b74af5ee6f51b6e924d9d7a65311085420 /t/t7512-status-help.sh | |
| parent | Merge branch 'pw/rebase-i-internal' (diff) | |
| parent | fix cherry-pick/revert status after commit (diff) | |
| download | git-b51a0fdc3822c2ef260f6d496b6df6d33b101e8a.tar.gz git-b51a0fdc3822c2ef260f6d496b6df6d33b101e8a.zip | |
Merge branch 'pw/clean-sequencer-state-upon-final-commit'
"git chery-pick" (and "revert" that shares the same runtime engine)
that deals with multiple commits got confused when the final step
gets stopped with a conflict and the user concluded the sequence
with "git commit". Attempt to fix it by cleaning up the state
files used by these commands in such a situation.
* pw/clean-sequencer-state-upon-final-commit:
fix cherry-pick/revert status after commit
commit/reset: try to clean up sequencer state
Diffstat (limited to 't/t7512-status-help.sh')
| -rwxr-xr-x | t/t7512-status-help.sh | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/t/t7512-status-help.sh b/t/t7512-status-help.sh index 458608cc1e..c1eb72555d 100755 --- a/t/t7512-status-help.sh +++ b/t/t7512-status-help.sh @@ -780,6 +780,24 @@ EOF test_i18ncmp expected actual ' +test_expect_success 'status when cherry-picking after committing conflict resolution' ' + git reset --hard cherry_branch && + test_when_finished "git cherry-pick --abort" && + test_must_fail git cherry-pick cherry_branch_second one_cherry && + echo end >main.txt && + git commit -a && + cat >expected <<EOF && +On branch cherry_branch +Cherry-pick currently in progress. + (run "git cherry-pick --continue" to continue) + (use "git cherry-pick --abort" to cancel the cherry-pick operation) + +nothing to commit (use -u to show untracked files) +EOF + git status --untracked-files=no >actual && + test_i18ncmp expected actual +' + test_expect_success 'status showing detached at and from a tag' ' test_commit atag tagging && git checkout atag && @@ -857,6 +875,24 @@ EOF test_i18ncmp expected actual ' +test_expect_success 'status while reverting after committing conflict resolution' ' + test_when_finished "git revert --abort" && + git reset --hard new && + test_must_fail git revert old new && + echo reverted >to-revert.txt && + git commit -a && + cat >expected <<EOF && +On branch master +Revert currently in progress. + (run "git revert --continue" to continue) + (use "git revert --abort" to cancel the revert operation) + +nothing to commit (use -u to show untracked files) +EOF + git status --untracked-files=no >actual && + test_i18ncmp expected actual +' + test_expect_success 'prepare for different number of commits rebased' ' git reset --hard master && git checkout -b several_commits && |
