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

Re: git config oddity

From
Johannes Schindelin <johannes.schindelin@gmx.de>
Date
Jul 15, 2008, 15:33 UTC
Message-ID
<alpine.DEB.1.00.0807151631520.8950@racer>
In-Reply-To
<bd6139dc0807150829n2b3c88d7p18c203e93cd4e0c1@mail.gmail.com>
Hi,
On Tue, 15 Jul 2008, Sverre Rabbelier wrote:
Show 10 quoted lines
> On Tue, Jul 15, 2008 at 5:02 PM, Johannes Schindelin
> <Johannes.Schindelin@gmx.de> wrote:
> 
> > It is somewhat unfortunate that setting a variable does not find the 
> > section; the reason is that it sees sections only when a variable is 
> > set (to avoid having to do the parsing itself).
> 
> Ah, unfortunate indeed. I'm not sure I understand why it does not see 
> the existing header? I had a look at config.c but I couldn't really make 
> out why it doesn't.

The config writing uses the config parser to determine where the locations of the config variables (and therefore, sections) are by using the parser, and remembering the position in the file.

> Would it be difficult to add that?
Yes.

Ciao, Dscho

Previous: Sverre RabbelierNext: Sverre Rabbelier
Message 4 of 5 in “git config oddity”
  1. Sverre RabbelierJul 15, 2008
  2. Johannes SchindelinJul 15, 2008
  3. Sverre RabbelierJul 15, 2008
  4. Johannes SchindelinJul 15, 2008
  5. Sverre RabbelierJul 15, 2008

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.