Re: [PATCH 6/9] For each exclude pattern, store information about where it came from
- From
Philip Oakley <philipoakley@iee.org>
- Date
- Sep 2, 2012, 22:36 UTC
- Message-ID
- <A05E4811A66D499DA6AC932AC49F1E8F@PhilipOakley>
- In-Reply-To
- <7vipbwgnnv.fsf@alter.siamese.dyndns.org>
From: "Junio C Hamano" <gitster@pobox.com> Sent: Sunday, September 02, 2012 8:02 PM
Show 8 quoted lines
> "Philip Oakley" <philipoakley@iee.org> writes: > >> Is there a way to identify the config core.excludesfile if present? >> i.e. that it is from that config variable, rather than directory >> traversal. > > If the code handles $GIT_DIR/info/exclude then that configuration > would also be handled the same way, no?
Probably not. The $GIT_DIR/info/exclude is directly a path, while the core.excludesfile could point anywhere. This assumes the path to the relevant ignore file is shown.
Given the suggested report format in the Documentation, this path could be reported as 'coreexclude', not just an 'exclude'.
If I've understood the regular code correctly, the core.excludesfile is always at one end of the exclude struct so should be easy to check at that position.