Git development
 help / color / mirror / Atom feed
From: "Sverre Rabbelier" <alturin@gmail.com>
To: "Johannes Schindelin" <Johannes.Schindelin@gmx.de>
Cc: "Git Mailinglist" <git@vger.kernel.org>
Subject: Re: git config oddity
Date: Tue, 15 Jul 2008 17:29:15 +0200	[thread overview]
Message-ID: <bd6139dc0807150829n2b3c88d7p18c203e93cd4e0c1@mail.gmail.com> (raw)
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:
>> 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

  reply	other threads:[~2008-07-15 15:32 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-07-15 14:44 git config oddity Sverre Rabbelier
2008-07-15 15:02 ` Johannes Schindelin
2008-07-15 15:29   ` Sverre Rabbelier [this message]
2008-07-15 15:33     ` Johannes Schindelin
2008-07-15 15:35       ` Sverre Rabbelier

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bd6139dc0807150829n2b3c88d7p18c203e93cd4e0c1@mail.gmail.com \
    --to=alturin@gmail.com \
    --cc=Johannes.Schindelin@gmx.de \
    --cc=git@vger.kernel.org \
    --cc=sverre@rabbelier.nl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox