git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH v5 2/2] send-email: expose header information to git-send-email's sendemail-validate hook

From
Junio C Hamano <gitster@pobox.com>
Date
Jan 14, 2023, 01:17 UTC
Message-ID
<xmqqmt6loqxi.fsf@gitster.g>
In-Reply-To
<20230110211452.2568535-3-michael.strawbridge@amd.com>
"Strawbridge, Michael" <Michael.Strawbridge@amd.com> writes:
Show 6 quoted lines
> +It takes these command line arguments:
> +1. the name of the file that holds the e-mail to be sent.
> +2. the name of the file that holds the SMTP headers to be used.
> +
> +The hook doesn't need to support multiple header names (for example only Cc
> +is passed).

I think you meant, by "multiple header names", "header names spelled in different cases".

That may be a correct statement, but is more or less a useless one that does not help hook writers. Different people spell these headers in different capitalization (for example, your message came with "CC:" to various people, not "Cc:"), so the hook MUST know which case the feature adds to its input, if it chooses not to support different cases like "Cc:", "cc:", and "CC:". IOW, "only Cc is passed" is not something they need to hear as a mear example. They need to be told what headers are given to them and in what capitalization for all headers in the input to them.

> However, it does need to understand that lines beginning with
> +whitespace belong to the previous header.  The header information follows
> +the same format as the confirmation given at the end of send-email.

I suspect that many people (including me) disable the confirmation and to them, the above description would not help.

In general, documentation should not depend on the reader having an access to an environment where they can readily run commands and see their output.

Thanks.
Previous: Strawbridge, MichaelNext: Junio C Hamano
Message 7 of 16 in “send-email: expose header information to git-send-email's sendemail-validate hook”
  1. 0/2 send-email: expose header information to git-send-email's sendemail-validate hookStrawbridge, Michael, Jan 10, 2023
  2. 1/2 send-email: refactor header generation functionsStrawbridge, Michael, Jan 10, 2023
  3. Ævar Arnfjörð BjarmasonJan 17, 2023
  4. Junio C HamanoJan 17, 2023
  5. 1/2 send-email: refactor header generation functionsStrawbridge, Michael, Jan 17, 2023
  6. 2/2 send-email: expose header information to git-send-email's sendemail-validate hookStrawbridge, Michael, Jan 10, 2023
  7. Junio C HamanoJan 14, 2023
  8. Junio C HamanoJan 14, 2023
  9. Junio C HamanoJan 14, 2023
  10. Junio C HamanoJan 15, 2023
  11. Luben TuikovJan 17, 2023
  12. Junio C HamanoJan 17, 2023
  13. Luben TuikovJan 17, 2023
  14. Ævar Arnfjörð BjarmasonJan 17, 2023
  15. 2/2 send-email: expose header information to git-send-email's sendemail-validate hookStrawbridge, Michael, Jan 17, 2023
  16. 0/2 send-email: expose header information to git-send-email's sendemail-validate hookStrawbridge, Michael, Jan 17, 2023

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.