Commit

3e4574885f7c0c9e4a3a47dcd3373fa91ab17547

t3507: check no CHERRY_PICK_HEAD after conflicting --no-commit

Whether CHERRY_PICK_HEAD is written depends on the command, on whether
the merge started, and on --no-commit, all in one condition in
do_pick_commit().  The suite checks the clean --no-commit pick; nothing
checks the conflicting one.

The test that already runs a conflicting --no-commit pick compares the
advice the command prints, which is what tells us it stopped on a
conflict.  Assert the ref is missing there too.

Signed-off-by: Aleksei Sviridkin <f@lex.la>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Aleksei Sviridkin <f@lex.la> · 2026-09-05 17:13 UTC · committed by Junio C Hamano

Browse files
1 file changed, +2 −1
modified t/t3507-cherry-pick-conflict.sh
@@ -79,7 +79,8 @@ test_expect_success 'advice from failed cherry-pick --no-commit' "
79 79 EOF
80 80 test_must_fail git cherry-pick --no-commit picked 2>actual &&
81 81
82 - test_cmp expected actual
82 + test_cmp expected actual &&
83 + test_ref_missing CHERRY_PICK_HEAD
83 84 "
84 85
85 86 test_expect_success 'failed cherry-pick sets CHERRY_PICK_HEAD' '