diff options
| author | Vegard Nossum <vegard.nossum@oracle.com> | 2024-02-02 10:18:50 +0100 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2024-02-08 09:17:55 -0800 |
| commit | e4301f73fffacf2ba9fb2042b95de32880381e72 (patch) | |
| tree | a5ba75a715b8660f2412088f8d9ddc8be555a2f8 /t/t3404-rebase-interactive.sh | |
| parent | 564d0252ca632e0264ed670534a51d18a689ef5d (diff) | |
| download | git-e4301f73fffacf2ba9fb2042b95de32880381e72.tar.gz | |
sequencer: unset GIT_CHERRY_PICK_HELP for 'exec' commands
Running "git cherry-pick" as an x-command in the rebase plan loses
the original authorship information.
To fix this, unset GIT_CHERRY_PICK_HELP for 'exec' commands.
Helped-by: Phillip Wood <phillip.wood123@gmail.com>
Signed-off-by: Vegard Nossum <vegard.nossum@oracle.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t3404-rebase-interactive.sh')
| -rwxr-xr-x | t/t3404-rebase-interactive.sh | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/t/t3404-rebase-interactive.sh b/t/t3404-rebase-interactive.sh index c5f30554c6..84a92d6da0 100755 --- a/t/t3404-rebase-interactive.sh +++ b/t/t3404-rebase-interactive.sh @@ -153,6 +153,18 @@ test_expect_success 'rebase -i with the exec command checks tree cleanness' ' git rebase --continue ' +test_expect_success 'cherry-pick works with rebase --exec' ' + test_when_finished "git cherry-pick --abort; \ + git rebase --abort; \ + git checkout primary" && + echo "exec git cherry-pick G" >todo && + ( + set_replace_editor todo && + test_must_fail git rebase -i D D + ) && + test_cmp_rev G CHERRY_PICK_HEAD +' + test_expect_success 'rebase -x with empty command fails' ' test_when_finished "git rebase --abort ||:" && test_must_fail env git rebase -x "" @ 2>actual && |
