{"thread":{"id":"62264","subject":"[BUG?] format-patch: --cover-letter doesn't use --from","startedAt":"2024-10-06T18:47:33Z","lastAt":"2024-10-06T18:47:33Z","messageCount":1,"participants":["Kristoffer Haugsbakk"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"504204","messageId":"95cb9cf15a4f3b17cee5f14fa0bcba9d40a0ebb8.1728239131.git.code@khaugsbakk.name","threadId":"62264","inReplyTo":null,"subject":"[BUG?] format-patch: --cover-letter doesn't use --from","fromName":"Kristoffer Haugsbakk","fromEmail":"code@khaugsbakk.name","sentAt":"2024-10-06T18:46:10Z","receivedAt":"2024-10-06T18:47:33Z","isPatch":false,"sender":{"key":"code@khaugsbakk.name","avatar":"https://avatars.githubusercontent.com/u/2229597?v=4"},"body":"From: Kristoffer Haugsbakk <kristofferhaugsbakk@fastmail.com>\n\nThank you for filling out a Git bug report!\nPlease answer the following questions to help us understand your issue.\n\nWhat did you do before the bug happened? (Steps to reproduce your issue)\n\nSteps to reproduce is in the test below.\n\nI wanted to send patches with my own domain as the author but using my email\nprovider as the sender.\n\nWhat did you expect to happen? (Expected behavior)\n\nThat the `--from` ident was used for the cover letter and the patches.\n\nWhat happened instead? (Actual behavior)\n\nThe cover letter used my committer ident.  It correctly used the `--from` ident\nfor the patches.\n\nWhat's different between what you expected and what actually happened?\n\n-\n\nAnything else you want to add:\n\nSee the test.\n\nPlease review the rest of the bug report below.\nYou can delete any lines you don't wish to share.\n\n\n[System Info]\ngit version:\ngit version 2.46.2\ncpu: x86_64\nno commit associated with this build\nsizeof-long: 8\nsizeof-size_t: 8\nshell-path: /bin/sh\nlibcurl: 7.81.0\nzlib: 1.2.11\nuname: Linux 6.8.0-45-generic #45~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Wed Sep 11 15:25:05 UTC 2 x86_64\ncompiler info: gnuc: 11.4\nlibc info: glibc: 2.35\n$SHELL (typically, interactive shell): /bin/bash\n\n\n[Enabled Hooks]\npost-applypatch\npost-checkout\npost-commit\npost-merge\npost-rewrite\npre-auto-gc\nreference-transaction\nsendemail-validate\n\n-- >8 --\nSubject: t4014: exercise --from with --cover-letter\nFrom: Kristoffer Haugsbakk <code@khaugsbakk.name>\n\nSigned-off-by: Kristoffer Haugsbakk <code@khaugsbakk.name>\n---\n t/t4014-format-patch.sh | 10 ++++++++++\n 1 file changed, 10 insertions(+)\n\ndiff --git a/t/t4014-format-patch.sh b/t/t4014-format-patch.sh\nindex 1c46e963e43..41a3fffcd2f 100755\n--- a/t/t4014-format-patch.sh\n+++ b/t/t4014-format-patch.sh\n@@ -2548,4 +2548,14 @@ test_expect_success 'format-patch --default-prefix overrides format.noprefix' '\n \tgrep \"^--- a/blorp\" actual\n '\n \n+test_expect_success '--cover-letter respects --from' '\n+\tgit format-patch -1 --stdout --cover-letter \\\n+\t\t--from=\"Me <me@example.com>\" |\n+\t\tgrep \"^From: \" | head -1 >actual &&\n+\tcat <<-\\EOF >expect &&\n+\tFrom: Me <me@example.com>\n+\tEOF\n+\ttest_cmp expect actual\n+'\n+\n test_done\n-- \n2.46.1.641.g54e7913fcb6\n\n"}]}