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

Re: [PATCH v1] am: fix signoff when other trailers are present

From
PWPhillip Wood <phillip.wood@talktalk.net>
Date
Aug 8, 2017, 10:22 UTC
Message-ID
<866e9789-73f7-697d-a68c-c536b0e9b90d@talktalk.net>
In-Reply-To
<xmqqfud3qndj.fsf@gitster.mtv.corp.google.com>
On 07/08/17 18:49, Junio C Hamano wrote:
Show 31 quoted lines
> Phillip Wood <phillip.wood@talktalk.net> writes:
> 
>> From: Phillip Wood <phillip.wood@dunelm.org.uk>
>>
>> If there was no 'Signed-off-by:' trailer but another trailer such as
>> 'Reported-by:' then 'git am --signoff' would add a blank line between
>> the existing trailers and the added 'Signed-off-by:' line. e.g.
>>
>>     Rebase accepts '--rerere-autoupdate' as an option but only honors
>>     it if '-m' is also given. Fix it for a non-interactive rebase by
>>     passing on the option to 'git am' and 'git cherry-pick'.
>>
>>     Reported-by: Junio C Hamano <gitster@pobox.com>
>>
>>     Signed-off-by: Phillip Wood <phillip.wood@dunelm.org.uk>
>>
>> Fix by using the code provided for this purpose in sequencer.c.
>> Change the tests so that they check the formatting of the
>> 'Signed-off-by:' lines rather than just grepping for them.
>>
>> Signed-off-by: Phillip Wood <phillip.wood@dunelm.org.uk>
>> ---
>> I'm not sure if this should be calling ignore_non_trailer() or not -
>> git commit does but git cherry-pick does not. This follows commit and
>> cherry-pick in ignoring the value of trailer.ifExists for the signoff.
>> I'm a bit surprised they do that - is it correct?
> 
> These built-in "sign-off" machinery long predates the "trailer"
> thing, so I am not surprised if they do not behave the same.  I
> vaguely recall having discussions on this earlier this year, but
> details escape me.  

Ah, that explains it. I did a quick search on public-inbox but didn't turn up any obvious discussion about --signoff and trailer config. If that's the behavior people are used to then lets leave it as it is unless there is a call for it to be changed.

> Asking Jonathan, who did a series that ends at 44dc738a ("sequencer:
> add newline before adding footers", 2017-04-26), and Christian, who
> is the original contirbutor to the "trailer" machinery, for input.
> 
Previous: Phillip WoodNext: Phillip Wood
Message 5 of 8 in “am: fix signoff when other trailers are present”
  1. am: fix signoff when other trailers are presentPhillip Wood, Aug 7, 2017
  2. Junio C HamanoAug 7, 2017
  3. Jonathan TanAug 7, 2017
  4. Phillip WoodAug 8, 2017
  5. Phillip WoodAug 8, 2017
  6. am: fix signoff when other trailers are presentPhillip Wood, Aug 8, 2017
  7. Junio C HamanoAug 8, 2017
  8. am: fix signoff when other trailers are presentPhillip Wood, Aug 12, 2017

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.