diff options
author | Junio C Hamano <gitster@pobox.com> | 2023-07-06 21:54:47 +0300 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2023-07-06 21:54:47 +0300 |
commit | 391414e971d552e5e0fa1363347ec2c076062daf (patch) | |
tree | 8f2e9d061386ff10a340dcb10e67eeb2a53a3ebe /t | |
parent | 84b889bd035886cb19b1e9a9524dcf8a431836cd (diff) | |
parent | a096a889f43a40223bae89efa7d1896e0d4c37cb (diff) |
Merge branch 'jk/cherry-pick-revert-status'
During a cherry-pick or revert session that works on multiple
commits, "git status" did not give correct information, which has
been corrected.
* jk/cherry-pick-revert-status:
fix cherry-pick/revert status when doing multiple commits
Diffstat (limited to 't')
-rwxr-xr-x | t/t7512-status-help.sh | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/t/t7512-status-help.sh b/t/t7512-status-help.sh index 2f16d5787e..c2ab8a444a 100755 --- a/t/t7512-status-help.sh +++ b/t/t7512-status-help.sh @@ -774,6 +774,28 @@ EOF test_cmp expected actual ' +test_expect_success 'status when cherry-picking multiple commits' ' + git reset --hard cherry_branch && + test_when_finished "git cherry-pick --abort" && + test_must_fail git cherry-pick cherry_branch_second one_cherry && + TO_CHERRY_PICK=$(git rev-parse --short CHERRY_PICK_HEAD) && + cat >expected <<EOF && +On branch cherry_branch +You are currently cherry-picking commit $TO_CHERRY_PICK. + (fix conflicts and run "git cherry-pick --continue") + (use "git cherry-pick --skip" to skip this patch) + (use "git cherry-pick --abort" to cancel the cherry-pick operation) + +Unmerged paths: + (use "git add <file>..." to mark resolution) + both modified: main.txt + +no changes added to commit (use "git add" and/or "git commit -a") +EOF + git status --untracked-files=no >actual && + test_cmp 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" && |