Re: [PATCH 1/4] Split up default "core" config parsing into helper routine

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Jeff King <peff@...>
Cc: Junio C Hamano <gitster@...>, Git Mailing List <git@...>, Denis Bueno <dbueno@...>
Date: Wednesday, June 18, 2008 - 6:58 pm

On Wed, 18 Jun 2008, Jeff King wrote:

I considered it, but I think that screws up error reporting (ie if some 
value is unparseable, it would then print out the wrong variable name).

It would also have made the patches much less obvious. So it's a "future 
enhancement" thing.


Yeah, I know. I love the config file format (quite frankly, anybody who 
thinks XML and friends are sane is a total moron and should be shot before 
they reproduce), but the whole parsing code was a really quick hack. 

I've several times wanted to rewrite it so that it does something smarter 
(parse it once, save it in a nice data structure), but let's face it, the 
upside is rather small. So I've never really ended up having the energy.


No. We could already do that (just add it to the end of 
git_default_core_config - it should be called last even if there was a 
chain), but avoid doing that very much on purpose.

Why? Because it's really irritating to have a parser that complains about 
newer values (or old deprecated ones) that don't matter for that version 
of the program. 

			Linus
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH 0/4] Add 'core.fsyncobjectfiles' config option, Linus Torvalds, (Wed Jun 18, 6:29 pm)
Re: [PATCH 1/4] Split up default "core" config parsing into ..., Linus Torvalds, (Wed Jun 18, 6:58 pm)