Re: [BUG] git-diff-* --color oddness
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Jan 4, 2008, 09:37 UTC
- Message-ID
- <7vodc2kk2d.fsf@gitster.siamese.dyndns.org>
- In-Reply-To
- <20080104092505.GA2320@coredump.intra.peff.net>
Jeff King <peff@peff.net> writes:
Show 18 quoted lines
> On Fri, Jan 04, 2008 at 03:59:34AM -0500, Jeff King wrote: > >> OK. In that case, we need a way for the plumbing to tell the diff >> machinery "don't ever try loading the ui config." > >> > * funcname-pattern can go either way; that affects what appears >> > at the end of @@ context @@ lines, and would not have risk to >> > corrupt the patch for plumbing. > > I just sent a patch to put the funcname pattern in the "basic" config, > and to get rid of the lazy config loading. So that fixes one call by the > plumbing to read_config_if_needed. > > And it looks like the second call is already OK. We don't try parsing > the config to get the external diff command unless ALLOW_EXTERNAL is > set, which the plumbing already disallows (though I am still confused > why it would need to be loaded lazily in the first place -- I wonder if > read_config_if_needed is needed at all).
I think that was a premature optimization without benching. It is expected that most trees would not have attributes to define custom low-level diff types, and without them we do not need to parse the configuration to find out the external commands to be used.