Interplane page as plain text, for reading tools and agents. English is the reference text: translate it with your own tool. Text in backticks and in ``` blocks (commands, fingerprints, file names) and link targets in <...> are exact: copy them, never translate them. Page: /drakestapleton/git/blob/master/t/t3423-rebase-reword.sh # git [Ported from github.com/git/git] Sync with Git 2.56.1 Brought by drakestapleton Sign in to star 0 stars 0 watching About Files History Releases Proposed changes Issues For developers branch `master` Branches Tags History `git / t / t3423-rebase-reword.sh` 48 lines ยท 1096 bytes Raw Blame History 1 #!/bin/sh 2 3 test_description='git rebase interactive with rewording' 4 5 . ./test-lib.sh 6 7 . "$TEST_DIRECTORY"/lib-rebase.sh 8 9 test_expect_success 'setup' ' 10 test_commit main file-1 test && 11 12 git checkout -b stuff && 13 14 test_commit feature_a file-2 aaa && 15 test_commit feature_b file-2 ddd 16 ' 17 18 test_expect_success 'reword without issues functions as intended' ' 19 test_when_finished "reset_rebase" && 20 21 git checkout stuff^0 && 22 23 set_fake_editor && 24 FAKE_LINES="pick 1 reword 2" FAKE_COMMIT_MESSAGE="feature_b_reworded" \ 25 git rebase -i -v main && 26 27 test "$(git log -1 --format=%B)" = "feature_b_reworded" && 28 test $(git rev-list --count HEAD) = 3 29 ' 30 31 test_expect_success 'reword after a conflict preserves commit' ' 32 test_when_finished "reset_rebase" && 33 34 git checkout stuff^0 && 35 36 set_fake_editor && 37 test_must_fail env FAKE_LINES="reword 2" \ 38 git rebase -i -v main && 39 40 git checkout --theirs file-2 && 41 git add file-2 && 42 FAKE_COMMIT_MESSAGE="feature_b_reworded" git rebase --continue && 43 44 test "$(git log -1 --format=%B)" = "feature_b_reworded" && 45 test $(git rev-list --count HEAD) = 2 46 ' 47 48 test_done