Re: [BUG?] read_directory(), core.ignorecase and pathspec
- From
Junio C Hamano <gitster@pobox.com>
- Date
- May 12, 2011, 16:04 UTC
- Message-ID
- <7vwrhvdhwg.fsf@alter.siamese.dyndns.org>
- In-Reply-To
- <BANLkTimqJvLoWGxMzeSs9n7LrrLaE-azwQ@mail.gmail.com>
Nguyen Thai Ngoc Duy <pclouds@gmail.com> writes:
Show 5 quoted lines
> I was looking at how read_directory() uses pathspec, and it seems that > simplify_away(), the function that cuts out directories early if > they're definitely outside given pathspec, does exact match (ie. > memcmp) regardless core.ignorecase. This means "git add -- '*.c'" may > not work as expected when core.ignorecase is on.
I don't think for '*.c' it would make any difference, but it is very plausible that 'frotz/*.c' will cull 'Frotz/anything' as "never going to match".
> The whole simplifying thing in read_directory() will eventually be > replaced with real pathspec matching as we put more magic in pathspec.
That should be done not "as" but "before". Get the foundation right before going fancier.