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

Re: should config options be treated as case-sensitive?

From
Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Date
May 22, 2018, 12:13 UTC
Message-ID
<87h8mz99d2.fsf@evledraar.gmail.com>
In-Reply-To
<alpine.LFD.2.21.1805220353370.989@localhost.localdomain>
On Tue, May 22 2018, Robert P. J. Day wrote:
Show 36 quoted lines
>   in my wanderings, more oddities, such as this:
>
> $ grep -ir blankboundary *
> builtin/blame.c:	if (!strcmp(var, "blame.blankboundary")) {
> Documentation/config.txt:blame.blankBoundary::
> Documentation/blame-options.txt:	be controlled via the `blame.blankboundary` config option.
> Documentation/RelNotes/2.15.1.txt: * Description of blame.{showroot,blankboundary,showemail,date}
> Documentation/RelNotes/2.16.0.txt: * Description of blame.{showroot,blankboundary,showemail,date}
> $
>
> where you can see the single instance of "blankBoundary" in
> Doc/config.txt (with the upper case 'B'), while the rest have no such
> thing.
>
>   for fun, i checked another of blame's config settings, with similar
> results:
>
> builtin/blame.c:	if (!strcmp(var, "blame.showemail")) {
> Documentation/config.txt:blame.showEmail::
> Documentation/RelNotes/2.15.1.txt: * Description of blame.{showroot,blankboundary,showemail,date}
> Documentation/RelNotes/2.5.0.txt: * "git blame" learned blame.showEmail configuration variable.
> Documentation/RelNotes/2.16.0.txt: * Description of blame.{showroot,blankboundary,showemail,date}
> Documentation/git-blame.txt:	This can also be controlled via the `blame.showEmail` config
> t/t8002-blame.sh:test_expect_success 'setup showEmail tests' '
> t/t8002-blame.sh:test_expect_success 'blame with showemail options' '
> t/t8002-blame.sh:test_expect_success 'blame with showEmail config false' '
> t/t8002-blame.sh:	git config blame.showEmail false &&
> t/t8002-blame.sh:test_expect_success 'blame with showEmail config true' '
> t/t8002-blame.sh:	git config blame.showEmail true &&
>
>   thoughts?
>
> rday
>
> p.s. i am not *trying* to be annoyingly pedantic, i am merely
> succeeding.

The issues you note about the docs using foo.barbaz instead of foo.barBaz should be fixed, but as noted in the "Syntax" section of "git-config" we already document that the config keys are all case-insensitive. We just like talking about them as foo.barBaz because it makes for easier reading.

Previous: Robert P. J. DayNext: Robert P. J. Day
Message 2 of 8 in “should config options be treated as case-sensitive?”
  1. Robert P. J. DayMay 22, 2018
  2. Ævar Arnfjörð BjarmasonMay 22, 2018
  3. Robert P. J. DayMay 22, 2018
  4. Junio C HamanoMay 23, 2018
  5. Robert P. J. DayMay 23, 2018
  6. Junio C HamanoMay 23, 2018
  7. Robert P. J. DayMay 23, 2018
  8. Junio C HamanoMay 23, 2018

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.