Re: [PATCH 8/8] pathspec: convert parse_pathspec to take an index
- From
Johannes Sixt <j6t@kdbg.org>
- Date
- May 11, 2017, 05:04 UTC
- Message-ID
- <dab1beaf-ca8d-2f3f-9fcc-22e6938a868a@kdbg.org>
- In-Reply-To
- <xmqqh90sw4dr.fsf@gitster.mtv.corp.google.com>
Am 11.05.2017 um 03:48 schrieb Junio C Hamano:
Show 7 quoted lines
> But perhaps you are right---it may be wrong for the contents of the > current index (or any index) to affect how a pathspec element is > parsed in the first place. If the current code (before this series) > uses the_index only for error checking, we may want to separate that > out of the parse_pathspec() callchain, so that it does not even look > at any index (not just the_index). And that may be a better change > overall.
Just a reminder: if core.ignoreCase is set, the variant of a path in the index takes precedence over the variant found in the working tree. Hence, pathspec must be matched against the index that corresponds to the working tree. I guess that's the_index.
-- Hannes