From: Phillip Wood Date: Wed, 07 Feb 2024 14:03:16 GMT Subject: Re: [PATCH 2/2] sequencer: unset GIT_CHERRY_PICK_HELP for 'exec' commands Message-ID: <4e6d503a-8564-4536-82a7-29c489f5fec3@gmail.com> In-Reply-To: On 06/02/2024 03:54, Junio C Hamano wrote: > Vegard Nossum writes: > >> On 06/02/2024 00:09, Junio C Hamano wrote: > Perhaps it is a good idea to squash them together as a single bugfix > patch? I think so, I'm not sure we want to add a new test file just for this either. Having the test in a separate file was handy for debugging but I think something like the diff below would suffice though I wouldn't object to checking the author of the cherry-picked commit Best Wishes Phillip 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 &&