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

Re: git config problem with strange config files

From
Peter Oberndorfer <kumbayo84@arcor.de>
Date
Jan 1, 2008, 14:25 UTC
Message-ID
<200801011525.48148.kumbayo84@arcor.de>
In-Reply-To
<20080101061734.GA15453@coredump.intra.peff.net>
On Dienstag 01 Januar 2008, Jeff King wrote:
Show 13 quoted lines
> On Mon, Dec 31, 2007 at 06:47:41PM +0100, Peter Oberndorfer wrote:
> 
> > In case of a strange .git/config file "git config key value" can
> > create a bogus config entry, where one old value is wrong and the new
> > value resides in the wrong section until the config file is fixed up
> > by hand
> 
> This patch fixes the test case you gave.
> 
> Junio, even though such a config file should be rare, I think this is
> v1.5.4 material. But there is one tricky thing which I will point out in
> a followup mail.
> 
Thank you for the patch

I would also guess this is relative rare, but IIRC somebody posted a patch to handle a bogus config with a better message, and the breakage example in the mail looked similar to mine.

How i came up with this bogus config is relative simple. I wanted to add a new remote so i copied the already existing remote and branch sections down to the last line and somehow also added a trailing tab.

Then i did a stg init which uses git repo-config to add its stackformatversion = 2 setting

Greetings Peter
Previous: Junio C Hamano
Message 5 of 5 in “git config problem with strange config files”
  1. Peter OberndorferDec 31, 2007
  2. Jeff KingJan 1, 2008
  3. Jeff KingJan 1, 2008
  4. Junio C HamanoJan 1, 2008
  5. Peter OberndorferJan 1, 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.