Re: git config oddity
- From
- Sverre Rabbelier <alturin@gmail.com>
- Date
- Jul 15, 2008, 15:29 UTC
- Message-ID
- <bd6139dc0807150829n2b3c88d7p18c203e93cd4e0c1@mail.gmail.com>
- In-Reply-To
- <alpine.DEB.1.00.0807151600170.8950@racer>
On Tue, Jul 15, 2008 at 5:02 PM, Johannes Schindelin <Johannes.Schindelin@gmx.de> wrote:
Show 5 quoted lines
>> I noticed today that when unsetting the last value in a group git >> config leaves the empty group header. > > That is on purpose. As .git/config was always meant as a user-editable > file, you can put comments into that section. Or comment out some values.
Ok, this makes sense :). I agree that I would be unhappily surprised if I found that git removed a section that I had put some comments in when I unset a variable.
> 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. Would it be difficult to add that?
-- Cheers, Sverre Rabbelier