From: Li Chen Date: Tue, 14 Oct 2025 12:24:40 GMT Subject: [PATCH v4 27/29] tests: t3440: ensure trailers persist after rebase continue Message-ID: <20251014122452.1851103-28-me@linux.beauty> In-Reply-To: <20251014122452.1851103-1-me@linux.beauty> 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 --- 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