Thread (21 messages) flat view 21 messages, 4 authors, 13h ago
HOTtoday

[PATCH v3 1/2] t3507: check no CHERRY_PICK_HEAD after conflicting --no-commit

From: Aleksei Sviridkin <hidden>
Date: 2026-09-05 17:13:37
Subsystem: the rest · Maintainer: Linus Torvalds

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 <redacted>
---
 t/t3507-cherry-pick-conflict.sh | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/t/t3507-cherry-pick-conflict.sh b/t/t3507-cherry-pick-conflict.sh
index 44596cb1e8..aa004d929b 100755
--- a/t/t3507-cherry-pick-conflict.sh
+++ b/t/t3507-cherry-pick-conflict.sh
@@ -79,7 +79,8 @@ test_expect_success 'advice from failed cherry-pick --no-commit' "
 	EOF
 	test_must_fail git cherry-pick --no-commit picked 2>actual &&
 
-	test_cmp expected actual
+	test_cmp expected actual &&
+	test_ref_missing CHERRY_PICK_HEAD
 "
 
 test_expect_success 'failed cherry-pick sets CHERRY_PICK_HEAD' '
-- 
2.55.0
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help