On 10/01/2024 16:35, Ghanshyam Thakkar wrote:
Add tests for amending the commit to add Signed-off-by trailer. And also to check if it does not add another trailer if one already exists. Currently, there are tests for --signoff separately in t7501, however, they are not tested with --amend. Therefore, these tests belong with other similar tests of --amend in t7501-commit-basic-functionality. Signed-off-by: Ghanshyam Thakkar <shyamthakkar001@xxxxxxxxx>
This version looks good, thanks for re-rolling. I have left one comment below but it is not worth re-rolling just for that.
+test_expect_success 'amend commit to add signoff' ' + + test_commit "msg" file content && + git commit --amend --signoff && + test_commit_message HEAD <<-EOF + msg + + Signed-off-by: $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> + EOF + +'
If you do happen re-roll I think we could happily lose the empty line before the closing "'" in this test and the next.
Best Wishes Phillip