From 044a654c5e9d004935fdcc1abf755bc0e49151bd Mon Sep 17 00:00:00 2001 From: Bryce Kwon Date: Sat, 7 Nov 2026 13:11:28 -1000 Subject: Test enable-plain-email=0 where it changes output No test set it, though it switches the patch to a format of cgit's own and drops the address from the feed and the trailer idents. --- tests/t0109-patch.sh | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'tests/t0109-patch.sh') diff --git a/tests/t0109-patch.sh b/tests/t0109-patch.sh index 6aae556..88e94ae 100755 --- a/tests/t0109-patch.sh +++ b/tests/t0109-patch.sh @@ -70,6 +70,16 @@ test_expect_success 'the signature names the version when asked to' ' check_cgit_signature "$CGIT_VERSION" ' +# Without plain email the patch is written from a format of cgit's own, whose +# From line carries the name alone. +test_expect_success 'enable-plain-email=0 leaves the address off the patch' ' + cgitrc_copy plainrc enable-plain-email=0 && + cgit_ok plainrc "url=foo/patch" >tmp && + grep "^From: A U Thor$" tmp && + grep "^Subject: commit 5$" tmp && + ! grep "author@example.com" tmp +' + # The old name of a file renamed in the commit joins the limit, so the patch # carries the rename rather than a file added whole. test_expect_success 'a renamed file is patched as the rename' ' -- cgit 2.12.1