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

Re: [PATCH v10 11/12] Documentation: add documentation for 'git interpret-trailers'

From
Junio C Hamano <gitster@pobox.com>
Date
May 27, 2014, 19:18 UTC
Message-ID
<xmqqd2ezf2tf.fsf@gitster.dls.corp.google.com>
In-Reply-To
<20140525.103721.1806399553055631284.chriscool@tuxfamily.org>
Christian Couder <chriscool@tuxfamily.org> writes:
Show 10 quoted lines
> From: Michael Haggerty <mhagger@alum.mit.edu>
> ...
> An option like --input-separator might be enough to support this.
>
>> For me this means:
>> 
>> * Enumerating a list of allowed separators (e.g., [:=#])
>
> Junio suggested in a message that users might use different separators
> like '%'.

I actually think we shouldn't go any fancier than ":" and nothing else, not even "#".

I was hoping that you would eventually realize that there are only two viable extremes when I suggested "the users may want to use other random characters like '%'" and also "the users can specify the 'key' with colon and trailing SP" (in $gmane/245960).

 - If you want to give the projects greater control of the format,
   then you cannot rely on "separators" anyway.  Your users can list
   all possible footer "keys" the particular project would use, so
   that they are recognized by Git, be that "Fixes: 4a28f16", "Bug
   #12354", without hard-coding what "separator" Git must pay
   attention to.  You can easily find a run of lines that begin with
   any of the "key" (e.g. "Fixes: ", "Signed-off-by: ", "Bug #",
   ...) starting from the tail-end of the log message and that is
   your footer block.  No need for "separators" at all.
 - If you want to give the projects freedom to come up with random
   new kinds of footers without pre-arrangement, then you need to
   have a reliable way to say if any line you have never seen could
   be a footer material.  A colon has been used everywhere, and used
   even in the "Fixes: 4a28f16" example you took from the kernel
   circle.  I think you presented it with '#' but I do not think
   they even want that, looking at:
   http://lists.linuxfoundation.org/pipermail/ksummit-discuss/2014-May/000618.html

I also think that bug tracking system using "Bug #12345" is an unrelated issue, as log viewers would want to highlight and make links out of them anywhere in the log message text, not limited to the log footer part.

As to which one of these two we should take, I tend to think that we should start small and limited; loosening the syntax later is much easier than going the other way, i.e. ":" and nothing else.

Previous: Johan HerlandNext: Junio C Hamano
Message 21 of 33 in “Add interpret-trailers builtin”
  1. 00/12 Add interpret-trailers builtinChristian Couder, Apr 6, 2014
  2. 01/12 trailer: add data structures and basic functionsChristian Couder, Apr 6, 2014
  3. 02/12 trailer: process trailers from stdin and argumentsChristian Couder, Apr 6, 2014
  4. 03/12 trailer: read and process config informationChristian Couder, Apr 6, 2014
  5. 04/12 trailer: process command line trailer argumentsChristian Couder, Apr 6, 2014
  6. 05/12 trailer: parse trailers from stdinChristian Couder, Apr 6, 2014
  7. 06/12 trailer: put all the processing together and printChristian Couder, Apr 6, 2014
  8. 07/12 trailer: add interpret-trailers commandChristian Couder, Apr 6, 2014
  9. 08/12 trailer: add tests for "git interpret-trailers"Christian Couder, Apr 6, 2014
  10. 09/12 trailer: execute command from 'trailer.<name>.command'Christian Couder, Apr 6, 2014
  11. 10/12 trailer: add tests for commands in config fileChristian Couder, Apr 6, 2014
  12. 11/12 Documentation: add documentation for 'git interpret-trailers'Christian Couder, Apr 6, 2014
  13. Michael HaggertyApr 8, 2014
  14. Christian CouderApr 8, 2014
  15. Michael HaggertyApr 8, 2014
  16. Christian CouderApr 25, 2014
  17. Michael HaggertyApr 28, 2014
  18. Christian CouderMay 25, 2014
  19. Michael HaggertyMay 27, 2014
  20. Johan HerlandMay 27, 2014
  21. Junio C HamanoMay 27, 2014
  22. Junio C HamanoApr 8, 2014
  23. Junio C HamanoApr 8, 2014
  24. Christian CouderApr 25, 2014
  25. Junio C HamanoApr 28, 2014
  26. Jeremy MortonApr 29, 2014
  27. Christian CouderApr 29, 2014
  28. Jeremy MortonApr 29, 2014
  29. Christian CouderMay 1, 2014
  30. Jeremy MortonApr 29, 2014
  31. 12/12 trailer: add blank line before the trailers if neededChristian Couder, Apr 6, 2014
  32. Junio C HamanoApr 7, 2014
  33. Christian CouderApr 8, 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.