summaryrefslogtreecommitdiff
path: root/t/t3429-rebase-edit-todo.sh
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2019-12-06 15:09:21 -0800
committerJunio C Hamano <gitster@pobox.com>2019-12-06 15:09:22 -0800
commitf233c9f4550a831a69892e0a38db2a7654beb995 (patch)
treeac12d3bd63de58f9b128729192aed904caa6b4f3 /t/t3429-rebase-edit-todo.sh
parentef3ce7c4b9f5ed7a13a0efcc576df855c4fd3d0f (diff)
parentbefd4f6a81d382cc2b34186b619f734fa5f8070f (diff)
downloadgit-f233c9f4550a831a69892e0a38db2a7654beb995.tar.gz
Merge branch 'sg/assume-no-todo-update-in-cherry-pick'
While running "revert" or "cherry-pick --edit" for multiple commits, a recent regression incorrectly detected "nothing to commit, working tree clean", instead of replaying the commits, which has been corrected. * sg/assume-no-todo-update-in-cherry-pick: sequencer: don't re-read todo for revert and cherry-pick
Diffstat (limited to 't/t3429-rebase-edit-todo.sh')
-rwxr-xr-xt/t3429-rebase-edit-todo.sh30
1 files changed, 30 insertions, 0 deletions
diff --git a/t/t3429-rebase-edit-todo.sh b/t/t3429-rebase-edit-todo.sh
index aaeac6eade..7024d49ae7 100755
--- a/t/t3429-rebase-edit-todo.sh
+++ b/t/t3429-rebase-edit-todo.sh
@@ -52,4 +52,34 @@ test_expect_success 'todo is re-read after reword and squash' '
test_cmp expected actual
'
+test_expect_success 're-reading todo doesnt interfere with revert --edit' '
+ git reset --hard third &&
+
+ git revert --edit third second &&
+
+ cat >expect <<-\EOF &&
+ Revert "second"
+ Revert "third"
+ third
+ second
+ first
+ EOF
+ git log --format="%s" >actual &&
+ test_cmp expect actual
+'
+
+test_expect_success 're-reading todo doesnt interfere with cherry-pick --edit' '
+ git reset --hard first &&
+
+ git cherry-pick --edit second third &&
+
+ cat >expect <<-\EOF &&
+ third
+ second
+ first
+ EOF
+ git log --format="%s" >actual &&
+ test_cmp expect actual
+'
+
test_done