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

Re: [PATCH RFC] git-am: support any number of signatures

From
Christian Couder <christian.couder@gmail.com>
Date
Oct 12, 2014, 09:36 UTC
Message-ID
<CAP8UFD1ATE-CtqXJyd7qDw-34RJ3ZQibHo6BSi+42hkaPNzz5w@mail.gmail.com>
In-Reply-To
<7viok7k0c0.fsf@alter.siamese.dyndns.org>
On Sun, Sep 28, 2014 at 9:32 PM, Junio C Hamano <gitster@pobox.com> wrote:
Show 12 quoted lines
> Christian Couder <chriscool@tuxfamily.org> writes:
>
>> From: Junio C Hamano <gitster@pobox.com>
>>
>>> If that is what happens, it is not a workable workaround to set Sob to
>>> addIfDifferent only for this invocation.
>>
>> Setting S-o-b to addIfDifferent for this invocation would not add the
>> S-o-b at the end, because another S-o-b still exists in the input
>> message "seen" when the last S-o-b is processed.
>
> So there is no workaround whatsoever, which is worse X-<.
I think there might be a misunderstanding.

With v16 you can easily choose if you want to have the S-o-b in the output or not, when there is already one, see:

$ cat test.txt
Signed-off-by: <Michael>

$ cat test.txt | git interpret-trailers --trailer 'Acked-by: <Michael>' --trailer 'Reviewed-by: <Michael>' --trailer 'Tested-by: <Michael>' --trailer 'Signed-off-by: <Michael>'

Signed-off-by: <Michael>
Acked-by: <Michael>
Reviewed-by: <Michael>
Tested-by: <Michael>
Signed-off-by: <Michael>

$ cat test.txt | git -c 'trailer.ifexists=addIfDifferent' interpret-trailers --trailer 'Acked-by: <Michael>' --trailer 'Reviewed-by: <Michael>' --trailer 'Tested-by: <Michael>' --trailer 'Signed-off-by: <Michael>'

Signed-off-by: <Michael>
Acked-by: <Michael>
Reviewed-by: <Michael>
Tested-by: <Michael>
Or:

$ cat test.txt | git -c 'trailer.Signed-off-by.ifexists=addIfDifferent' interpret-trailers --trailer 'Acked-by: <Michael>' --trailer 'Reviewed-by: <Michael>' --trailer 'Tested-by: <Michael>' --trailer 'Signed-off-by: <Michael>'

Signed-off-by: <Michael>
Acked-by: <Michael>
Reviewed-by: <Michael>
Tested-by: <Michael>
(There was a small bug in v15 with the last command above.)
Show 15 quoted lines
>>> Alternatively, if Neighbor-ness is evaluated first before you add A/R/T
>>> in response to this request, then you'd refrain from adding a duplicate
>>> Sob. It wasn't quite clear from your description what your design was,
>>> and your explanation above is not still clear, at least to me.
>>
>> I hope it is clearer now. Maybe I should add something in the doc to
>> better explain how it works.
>
> I doubt that it would help the users materially to document that we
> chose to implement a less useful way when there are multiple ways in
> which a feature can work, though.
>
> Unless I am mis-reading you and you are actually saying that the
> users can emulate the "atomic" variant without much hassle by doing
> X and Y, that is.  If so, it would help readers to document them.

If you would like me to document the 3 above commands in an example, I am ok to do that.

Thanks, Christian.

Previous: Michael S. TsirkinNext: Christian Couder
Message 28 of 31 in “git-am: support any number of signatures”
  1. git-am: support any number of signaturesMichael S. Tsirkin, Jun 12, 2014
  2. Junio C HamanoJun 12, 2014
  3. Michael S. TsirkinJun 13, 2014
  4. Junio C HamanoJun 13, 2014
  5. Michael S. TsirkinJun 15, 2014
  6. Junio C HamanoJun 16, 2014
  7. Michael S. TsirkinJun 18, 2014
  8. Junio C HamanoJun 18, 2014
  9. Michael S. TsirkinJun 18, 2014
  10. Junio C HamanoJun 18, 2014
  11. Michael S. TsirkinJun 18, 2014
  12. Michael S. TsirkinSep 22, 2014
  13. Junio C HamanoSep 22, 2014
  14. Christian CouderSep 23, 2014
  15. Michael S. TsirkinSep 23, 2014
  16. Christian CouderSep 24, 2014
  17. Michael S. TsirkinOct 7, 2014
  18. Junio C HamanoSep 23, 2014
  19. Junio C HamanoSep 25, 2014
  20. Christian CouderSep 25, 2014
  21. Junio C HamanoSep 25, 2014
  22. Christian CouderSep 28, 2014
  23. Michael S. TsirkinOct 7, 2014
  24. Jeff KingOct 7, 2014
  25. Junio C HamanoOct 7, 2014
  26. René ScharfeJun 12, 2014
  27. Michael S. TsirkinJun 13, 2014
  28. Christian CouderOct 12, 2014
  29. Christian CouderOct 13, 2014
  30. Junio C HamanoOct 13, 2014
  31. Christian CouderOct 14, 2014

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.