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

Re: [PATCH] git-contacts: Add recognition of Reported-by

From
Jeff King <peff@peff.net>
Date
Jul 24, 2017, 19:36 UTC
Message-ID
<20170724193651.ocup4b6cs5hqmstx@sigill.intra.peff.net>
In-Reply-To
<xmqqzibtd473.fsf@gitster.mtv.corp.google.com>
On Mon, Jul 24, 2017 at 12:29:04PM -0700, Junio C Hamano wrote:
Show 22 quoted lines
> > There's already some prior art around trailers in the trailer.* config.
> > I wonder if it would make sense to claim a new key there, like:
> >
> >   git config trailer.Reported-by.autocc true
> >
> > If "Reported-by" is a trailer that your project uses, then there may be
> > some benefit to setting up other config related to it, and this would
> > mesh nicely. And then potentially other programs besides git-contacts
> > would want to respect that flag (perhaps send-email would even want to
> > do it itself; I think it already respects cc and s-o-b headers).
> 
> Sounds like a good suggestion.  But...
> 
> If I understand your proposal, the trailer stuff would still not
> care what value .autocc is set to while doing its own thing, but the
> programs that read the text file that the trailer can work on would
> pay attention to it, and they individually have to do so?  Perhaps
> there is a need for another mode "interpret-trailers" is told to run
> in, where it is given a text file with trailers in it and is told to
> show only the value that has .autocc bit on?  Alternatively, yield
> <key, value> pairs so that the user of the tool can further process
> the value differently depending on the key, or something?

Yeah, I don't think interpret-trailers is currently a useful tool for looking at an extra config key like that. I'd expect it would need to be extended, or a new tool added, or perhaps existing tools would need to learn more about how trailers work (e.g., it would be nice if git-log could do matching or even print them via %(trailer:reported-by) placeholders or something). I think there's a lot of potential work in that area.

Of course git-contacts (or send-email) _can_ just look look at all of the trailer.*.autocc config and try to match those manually. But the point of having trailer config, I think, is that we should stop doing ad-hoc parsing and have a tool for manipulating and querying trailers. If interpret-trailers isn't up to the task yet, I'd rather see work go there.

But that (manual parsing) is basically how the current cc and s-o-b trailers implemented inside of git-send-email, so I don't think it would be the end of the world as a quick hack that could later be expanded to use the trailer infrastructure.

-Peff
Previous: Junio C HamanoNext: Junio C Hamano
Message 7 of 8 in “git-contacts: Add recognition of Reported-by”
  1. git-contacts: Add recognition of Reported-byEric Blake, Jul 21, 2017
  2. Junio C HamanoJul 21, 2017
  3. Eric BlakeJul 21, 2017
  4. Junio C HamanoJul 21, 2017
  5. Jeff KingJul 24, 2017
  6. Junio C HamanoJul 24, 2017
  7. Jeff KingJul 24, 2017
  8. Junio C HamanoJul 27, 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.