Re: bash_completion outside repo
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Sep 11, 2009, 21:57 UTC
- Message-ID
- <7vr5uduotz.fsf@alter.siamese.dyndns.org>
- In-Reply-To
- <20090911212938.GA26589@coredump.intra.peff.net>
Jeff King <peff@peff.net> writes:
> I think something like that needs to "belong" to the diff code itself. I > guess in the case of "diff", we could check all diff-related config at > diff setup time.
Not necessarily. You do not want to care about color configuration if you are doing diff --raw for example. The one that first uses the color variable should be able to notice the breakage, no?
> But what about something used in several places, like > core.quotepath?
Exactly the same way I checked what codepaths needed to fix for the autosetupmerge stuff. core.quotepath internally sets quote_path_fully, and the sole user of quote_path_fully is sq_must_quote() which is only used by next_quote_pos(). So you can have your check very isolated.