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

Re: [PATCH] Documentation: Mention `Date: ` in git-am

From
Junio C Hamano <gitster@pobox.com>
Date
Jan 4, 2020, 03:33 UTC
Message-ID
<xmqqblrjdhek.fsf@gitster-ct.c.googlers.com>
In-Reply-To
<6ffcb6c0-d09e-45c4-d264-8a9024b67f3c@molgen.mpg.de>
Paul Menzel <pmenzel@molgen.mpg.de> writes:
> Subject: Re: [PATCH] Documentation: Mention `Date: ` in git-am

The technical term to refer to these From/Subject/Date override is "in-body header", and using it would make it easier to tell what the commit is about when this appears in "git shortlog" output. Perhaps

	am: document that Date: can appear as an in-body header
> Date: Fri, 3 Jan 2020 12:48:46 +0100

When the general public sees the patch for the first time is when the patch is authored as far as the participants of this list are concerned.

Please don't lie about the author date on this list.
Show 21 quoted lines
> Tested, that a line `Date: ` in the message body will be preferred by
> `git am` over the one in the message header. So, update the
> documentation.
>
> Signed-off-by: Paul Menzel <pmenzel@molgen.mpg.de>
> ---
>  Documentation/git-am.txt | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/Documentation/git-am.txt b/Documentation/git-am.txt
> index fc5750b3b8..11ca61b00b 100644
> --- a/Documentation/git-am.txt
> +++ b/Documentation/git-am.txt
> @@ -190,8 +190,8 @@ the commit, after stripping common prefix "[PATCH <anything>]".
>  The "Subject: " line is supposed to concisely describe what the
>  commit is about in one line of text.
>  
> -"From: " and "Subject: " lines starting the body override the respective
> -commit author name and title values taken from the headers.
> +"From: ", "Date: ", and "Subject: " lines starting the body override the
> +respective commit author name and title values taken from the headers.

Correct. It would be a good idea to fix "will be preferred" in the proposed log message to match this by reusing the verb "override". Perhaps like

	Similar to "From:" and "Subject:" already mentioned in the
	documentation, "Date:" can also appear as an in-body header
	to override the value in the e-mail headers.  Document it.
>  The commit message is formed by the title taken from the
>  "Subject: ", a blank line and the body of the message up to
Previous: Paul Menzel
Message 2 of 2 in “Documentation: Mention `Date: ` in git-am”
  1. Documentation: Mention `Date: ` in git-amPaul Menzel, Jan 3, 2020
  2. Junio C HamanoJan 4, 2020

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.