summaryrefslogtreecommitdiff
path: root/t/t3429-rebase-edit-todo.sh
diff options
context:
space:
mode:
Diffstat (limited to 't/t3429-rebase-edit-todo.sh')
-rwxr-xr-xt/t3429-rebase-edit-todo.sh32
1 files changed, 31 insertions, 1 deletions
diff --git a/t/t3429-rebase-edit-todo.sh b/t/t3429-rebase-edit-todo.sh
index 8739cb60a7..7024d49ae7 100755
--- a/t/t3429-rebase-edit-todo.sh
+++ b/t/t3429-rebase-edit-todo.sh
@@ -17,7 +17,7 @@ test_expect_success 'rebase exec modifies rebase-todo' '
test -e F
'
-test_expect_success SHA1 'loose object cache vs re-reading todo list' '
+test_expect_success 'loose object cache vs re-reading todo list' '
GIT_REBASE_TODO=.git/rebase-merge/git-rebase-todo &&
export GIT_REBASE_TODO &&
write_script append-todo.sh <<-\EOS &&
@@ -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