Thread (4 messages) flat view 4 messages, 2 authors, 2016-06-15

Re: git config problem with strange config files

From: Peter Oberndorfer <hidden>
Date: 2016-06-15 22:44:02

On Dienstag 01 Januar 2008, Jeff King wrote:
On Mon, Dec 31, 2007 at 06:47:41PM +0100, Peter Oberndorfer wrote:
quoted
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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help