Re: [PATCH 8/8] pathspec: convert parse_pathspec to take an index
- From
Junio C Hamano <gitster@pobox.com>
- Date
- May 11, 2017, 05:13 UTC
- Message-ID
- <xmqqo9v0ascy.fsf@gitster.mtv.corp.google.com>
- In-Reply-To
- <dab1beaf-ca8d-2f3f-9fcc-22e6938a868a@kdbg.org>
Johannes Sixt <j6t@kdbg.org> writes:
Show 13 quoted lines
> Am 11.05.2017 um 03:48 schrieb Junio C Hamano: >> 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.
Yes, but that is what happens after a path from a working tree is found to match a pathspec, to coerse its case into the one that is in the current index. The parse_pathspec() thing we are discussing would have finished looooong time before that actual "matching" is attempted.
Thanks.