[PATCH v5 21/29] t3440: assert trailer on HEAD after conflict rebase

Li Chen
2025-10-22T05:43:55Z

From: Li Chen <chenl311@chinatelecom.cn>

Switch the test to check the trailer on HEAD (not HEAD~2) and build the
expected message for "third", matching the rebased tip after conflicts.

Signed-off-by: Li Chen <chenl311@chinatelecom.cn>
---
t/t3440-rebase-trailer.sh | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/t/t3440-rebase-trailer.sh b/t/t3440-rebase-trailer.sh
index 504bdd86fc..fbc6f209f1 100755
--- a/t/t3440-rebase-trailer.sh
+++ b/t/t3440-rebase-trailer.sh
@@ -73,14 +73,14 @@ test_expect_success 'multiple Signed-off-by trailers all preserved' '
'

test_expect_success 'rebase -m --trailer adds trailer after conflicts' '
- create_expect file2-signed "file-2" &&
+ create_expect third-signed "third" &&
test_must_fail git rebase -m \
--trailer "Reviewed-by: Dev <dev@example.com>" \
second third &&
git checkout --theirs file &&
git add file &&
git rebase --continue &&
- test_commit_message HEAD~2 file2-signed
+ test_commit_message HEAD third-signed
'

test_expect_success 'rebase --root --trailer updates every commit' '
--
2.51.0