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

Re: git config key bug or by design?

From
Jeff King <peff@peff.net>
Date
Nov 28, 2012, 03:34 UTC
Message-ID
<20121128033408.GE27772@sigill.intra.peff.net>
In-Reply-To
<20121127221446.7f2fbf71@Indy>
On Tue, Nov 27, 2012 at 10:14:46PM -0500, Peter van der Does wrote:
> I noticed today I can't create a key starting with a number.
> 
> The source code[1] confirms this, but is this a bug or is it by design?

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").
Previous: Peter van der DoesNext: Peter van der Does
Message 2 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.