Re: [BUG?] read_directory(), core.ignorecase and pathspec

2 messages, 2 authors, 2016-06-15 · open the first message on its own page

Re: [BUG?] read_directory(), core.ignorecase and pathspec

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:51:13

Nguyen Thai Ngoc Duy [off-list ref] writes:
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.

Re: [BUG?] read_directory(), core.ignorecase and pathspec

From: Nguyen Thai Ngoc Duy <hidden>
Date: 2016-06-15 22:51:13

On Thu, May 12, 2011 at 11:04 PM, Junio C Hamano [off-list ref] wrote:
Nguyen Thai Ngoc Duy [off-list ref] writes:
quoted
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".
Right, it only checks prefix.
quoted
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.
Right, again.
-- 
Duy
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help