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

Re: how exactly can git config section names contain periods?

From
Jeff King <peff@peff.net>
Date
Jun 2, 2018, 09:26 UTC
Message-ID
<20180602092604.GC3200@sigill.intra.peff.net>
In-Reply-To
<alpine.LFD.2.21.1806020448030.24235@localhost.localdomain>
On Sat, Jun 02, 2018 at 04:50:57AM -0400, Robert P. J. Day wrote:
Show 22 quoted lines
> On Fri, 1 Jun 2018, Jeff King wrote:
> 
> > On Fri, Jun 01, 2018 at 04:14:12PM -0400, Robert P. J. Day wrote:
> >
> > >   $ git config --global a.b.c.d.e rday
> > >
> > > huh ... seemed to work fine, and added this to my ~/.gitconfig:
> > >
> > >   [a "b.c.d"]
> > >           e = rday
> > >
> > > as i see it, the first component is intgerpreted as the section
> > > name, the last component is the variable/key(?) name, and
> > > everything in between is treated as subsection(s), which is not at
> > > all obvious from that Doc file, or from "man git-config".
> >
> > Yep, your understanding is correct.
> 
>   just to be precise regarding terminology, in my example above, is
> "b.c.d" a single subsection, or does it refer to three subsections?
> i'm guessing it refers to a single subsection, which is fine with me,
> as long as it's very clearly explained that way in the docs.
It's a single subsection. Each config key at most one subsection.
-Peff
Previous: Robert P. J. DayNext: Robert P. J. Day
Message 8 of 13 in “how exactly can git config section names contain periods?”
  1. Robert P. J. DayJun 1, 2018
  2. Randall S. BeckerJun 1, 2018
  3. Jeff KingJun 1, 2018
  4. Robert P. J. DayJun 1, 2018
  5. Junio C HamanoJun 1, 2018
  6. Jeff KingJun 2, 2018
  7. Robert P. J. DayJun 2, 2018
  8. Jeff KingJun 2, 2018
  9. Robert P. J. DayJun 3, 2018
  10. SZEDER GáborJun 3, 2018
  11. Robert P. J. DayJun 3, 2018
  12. Jeff KingJun 4, 2018
  13. Johannes SixtJun 3, 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.