From: Junio C Hamano <gitster@pobox.com>
To: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Cc: Yakup Akbay <yakbay@ubicom.com>, git@vger.kernel.org
Subject: Re: [BUG] git config does not reuse section name
Date: Mon, 07 Dec 2009 19:27:05 -0800 [thread overview]
Message-ID: <7vy6lep2ly.fsf@alter.siamese.dyndns.org> (raw)
In-Reply-To: <alpine.DEB.1.00.0912080258010.4985@pacific.mpi-cbg.de> (Johannes Schindelin's message of "Tue\, 8 Dec 2009 03\:01\:21 +0100 \(CET\)")
Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:
> IIRC, due to technical limitations, the config machinery only recognizes
> sections if there is at least _one_ entry in them. This is because
> git_config() is used to determine (from the current file position) where
> the section begins.
Ah, the reading side should be able to get by with that parsing logic, as
an empty section is totally ignorable anyway. And the parser for the
writing side reuses that logic. Asking for removal code to notice the
empty section and remove it needs a bit of restructuring of the parsing
logic as currently it doesn't even see an empty section.
Thanks---the explanation makes sense (I am not saying "it justifies it"; I
only mean "it explains why the code behaves like that very well").
I think we have kept the original parsing structure since repo-config
added the write support, and "fixing" the issue is not that urgent, but it
would be nice to get it fixed. Perhaps somebody can find some time over
the upcoming holidays ;-)
prev parent reply other threads:[~2009-12-08 3:27 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-12-07 17:06 [BUG] git config does not reuse section name Yakup Akbay
2009-12-07 20:04 ` Junio C Hamano
2009-12-07 20:23 ` Sverre Rabbelier
2009-12-07 20:54 ` Junio C Hamano
2009-12-08 2:05 ` Johannes Schindelin
2009-12-08 2:01 ` Johannes Schindelin
2009-12-08 3:27 ` Junio C Hamano [this message]
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=7vy6lep2ly.fsf@alter.siamese.dyndns.org \
--to=gitster@pobox.com \
--cc=Johannes.Schindelin@gmx.de \
--cc=git@vger.kernel.org \
--cc=yakbay@ubicom.com \
/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