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

Re: Questions about trailer configuration semantics

From
Junio C Hamano <gitster@pobox.com>
Date
Jul 27, 2020, 20:11 UTC
Message-ID
<xmqqk0yog1lg.fsf@gitster.c.googlers.com>
In-Reply-To
<CAP8UFD1XV_jN10yOc2o4=5PtPcvT-RbxhY1H3swZz2r4g-Uzkw@mail.gmail.com>
Christian Couder <christian.couder@gmail.com> writes:
Show 17 quoted lines
>> >  $ printf '\naCKed: Zz\n' | \
>> >    git -c 'trailer.Acked.key=Acked' interpret-trailers --parse
>> >  will emit: "Acked: Zz"
>
> Yeah, I think that's nice, as it can make sure that the key appears in
> the same way. It's true that it would be better if it would be
> documented.
>
>> > but only if "key" is used, other config options doesn't cause it to be
>> > normalized.
>> > E.g:
>> >  $ printf '\naCKed: Zz\n' | \
>> >    git -c 'trailer.Acked.ifmissing=doNothing' interpret-trailers --parse
>> >  will emit: "aCKed: Zz" (still lowercase a and uppercase CK)
>
> Yeah, in this case we are not sure if "Acked" or "aCKed" is the right
> way to spell it.

OK, so in short, the trailer subsystem matches the second level of the configuration variable name (e.g. "Acked") in a case insensitive way, and it does *not* normalize the case in the output. The .key request is a mechanism to replace the matched key with the specified string, so there is *NO* case normalization in what Anders observed.

In other words,
  $ printf '\naCKed: Zz\n' | \
    git -c 'trailer.Acked.key=Rejected' interpret-trailers --parse
would have emitted "Rejected: Zz".
Previous: Jeff KingNext: Anders Waldenborg
Message 7 of 16 in “Questions about trailer configuration semantics”
  1. Anders WaldenborgJul 27, 2020
  2. Junio C HamanoJul 27, 2020
  3. Christian CouderJul 27, 2020
  4. Jeff KingJul 27, 2020
  5. Anders WaldenborgJul 27, 2020
  6. Jeff KingJul 27, 2020
  7. Junio C HamanoJul 27, 2020
  8. Anders WaldenborgJul 27, 2020
  9. Junio C HamanoJul 27, 2020
  10. Anders WaldenborgJul 28, 2020
  11. Anders WaldenborgJul 27, 2020
  12. Junio C HamanoJul 27, 2020
  13. Anders WaldenborgJul 27, 2020
  14. Christian CouderJul 28, 2020
  15. Jeff KingJul 28, 2020
  16. Junio C HamanoJul 28, 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.