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

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

From
Junio C Hamano <gitster@pobox.com>
Date
May 23, 2018, 01:55 UTC
Message-ID
<xmqqo9h7w2y2.fsf@gitster-ct.c.googlers.com>
In-Reply-To
<87h8mz99d2.fsf@evledraar.gmail.com>
Ævar Arnfjörð Bjarmason <avarab@gmail.com> writes:
Show 5 quoted lines
> 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.

The first and the last level of configuration variable names are case insensitive.

I said "first and last", as there are variables with 2-level and 3-level names. "foo.barBaz" is two-level and it is the same variable as "Foo.barbaz". "remote.origin.url" is three-level, and it is the same variable as "Remote.origin.URL", but it is not the same variable as "remote.ORIGIN.url".

If the documention does not make it clear, then we have documentation bug. As you said, I think we are OK in the sense that we do say a section or a variable name is icase and a subsection, if exist, is case sensitive, but there might be a better way to convey that fact without having the reader read the whole three paragraphs.

Previous: Robert P. J. DayNext: Robert P. J. Day
Message 4 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.