Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhillip Wood <phillip.wood@dunelm.org.uk>2021-08-20 18:40:36 +0300
committerJunio C Hamano <gitster@pobox.com>2021-08-23 19:36:26 +0300
commit0c164ae7a65f811ef3fb3188c63cd157335463bb (patch)
treeb9749cd368f602990608b79a0bbb09951ac52f28 /t/t3404-rebase-interactive.sh
parent2be6b6f411136c6773a90d2cfdacf3cccb79d3e6 (diff)
rebase -i: add another reword test
None of the existing reword tests check that there are no uncommitted changes when the editor is opened. Reuse the editor script from the last commit to fix this omission. Signed-off-by: Phillip Wood <phillip.wood@dunelm.org.uk> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t3404-rebase-interactive.sh')
-rwxr-xr-xt/t3404-rebase-interactive.sh13
1 files changed, 13 insertions, 0 deletions
diff --git a/t/t3404-rebase-interactive.sh b/t/t3404-rebase-interactive.sh
index 66bcbbf952..d877872e8f 100755
--- a/t/t3404-rebase-interactive.sh
+++ b/t/t3404-rebase-interactive.sh
@@ -839,6 +839,19 @@ test_expect_success 'reword' '
git show HEAD~2 | grep "C changed"
'
+test_expect_success 'no uncommited changes when rewording the todo list is reloaded' '
+ git checkout E &&
+ test_when_finished "git checkout @{-1}" &&
+ (
+ set_fake_editor &&
+ GIT_SEQUENCE_EDITOR="\"$PWD/fake-editor.sh\"" &&
+ export GIT_SEQUENCE_EDITOR &&
+ set_reword_editor &&
+ FAKE_LINES="reword 1 reword 2" git rebase -i C
+ ) &&
+ check_reworded_commits D E
+'
+
test_expect_success 'rebase -i can copy notes' '
git config notes.rewrite.rebase true &&
git config notes.rewriteRef "refs/notes/*" &&