Subject: [PATCH v4 27/29] tests: t3440: ensure trailers persist after rebase continue

From: Li Chen <[email-masked]>
Date: Tue, 14 Oct 2025 20:24:40 +0800

Rebuilt the conflict test branch, added a fourth commit,
and asserted that both the conflicted and subsequent commits
receive the --trailer data in t/t3440-rebase-trailer.sh.

Signed-off-by: Li Chen <[email-masked]>
---
 t/t3440-rebase-trailer.sh | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/t/t3440-rebase-trailer.sh b/t/t3440-rebase-trailer.sh
index dd703b0eb7..7a2ddb440e 100755
--- a/t/t3440-rebase-trailer.sh
+++ b/t/t3440-rebase-trailer.sh
@@ -85,13 +85,16 @@ test_expect_success 'multiple Signed-off-by trailers all preserved' '
 '
 
 test_expect_success 'rebase -m --trailer adds trailer after conflicts' '
+	git checkout -B conflict-branch third &&
+	test_commit fourth file &&
 	test_must_fail git rebase -m \
-		--trailer "$REVIEWED_BY_TRAILER" \
-		second third &&
+			--trailer "$REVIEWED_BY_TRAILER" \
+			second &&
 	git checkout --theirs file &&
 	git add file &&
 	git rebase --continue &&
-	expect_trailer_msg HEAD "third"
+	expect_trailer_msg HEAD "fourth" &&
+	expect_trailer_msg HEAD^ "third"
 '
 
 test_expect_success 'rebase --root --trailer updates every commit' '
-- 
2.51.0