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

Re: git config key bug or by design?

From
Peter van der Does <peter@avirtualhome.com>
Date
Nov 28, 2012, 12:11 UTC
Message-ID
<20121128071147.188a869e@Indy>
In-Reply-To
<20121128033408.GE27772@sigill.intra.peff.net>

On Tue, 27 Nov 2012 22:34:09 -0500 Jeff King <peff@peff.net> wrote:

Show 14 quoted lines
> 
> I don't recall ever discussing it. But what is it that you want to
> store in a key starting with a number? Git does not respect any such
> config values[1].
> 
> Are you writing a new tool that will store its config alongside git's?
> Even if the behavior is loosened, you would probably want to avoid
> starting your config keys with numbers, as older git versions would be
> around for a while and would choke on it.
> 
> -Peff
> 
> [1] You can still store arbitrary bytes in the subsection name (e.g.,
>     "foo.123.bar").

I am writing a tool, it needs to store branch names in a separate config file.

It's clear git doesn't respect those values, hence my question. I understand how to work around the problem, I would just prefix the key. I was just wondering if it was by design, which I guess it is as the parsing of the file will die if the key starts with a non-alpha character.

-- 
Peter van der Does

GPG key: CB317D6E

IRC: Ganseki on irc.freenode.net
Twitter: @petervanderdoes
Previous: Jeff KingNext: Jeff King
Message 3 of 4 in “git config key bug or by design?”
  1. Peter van der DoesNov 28, 2012
  2. Jeff KingNov 28, 2012
  3. Peter van der DoesNov 28, 2012
  4. Jeff KingNov 28, 2012

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.