{"thread":{"id":"27338","subject":"[BUG?] read_directory(), core.ignorecase and pathspec","startedAt":"2011-05-12T13:24:25Z","lastAt":"2011-05-13T00:39:31Z","messageCount":3,"participants":["Nguyen Thai Ngoc Duy","Junio C Hamano"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"167731","messageId":"BANLkTimqJvLoWGxMzeSs9n7LrrLaE-azwQ@mail.gmail.com","threadId":"27338","inReplyTo":null,"subject":"[BUG?] read_directory(), core.ignorecase and pathspec","fromName":"Nguyen Thai Ngoc Duy","fromEmail":"pclouds@gmail.com","sentAt":"2011-05-12T13:24:25Z","receivedAt":"2011-05-12T13:24:25Z","isPatch":false,"sender":{"key":"pclouds@gmail.com","avatar":"https://avatars.githubusercontent.com/u/720?v=4"},"body":"I was looking at how read_directory() uses pathspec, and it seems that\nsimplify_away(), the function that cuts out directories early if\nthey're definitely outside given pathspec, does exact match (ie.\nmemcmp) regardless core.ignorecase. This means \"git add -- '*.c'\" may\nnot work as expected when core.ignorecase is on.\n\nI haven't tested it though. Just heads up. If you care about\ncore.ignorecase (I don't apparently), you can try it out.\n\nThe whole simplifying thing in read_directory() will eventually be\nreplaced with real pathspec matching as we put more magic in pathspec.\n-- \nDuy\n"},{"id":"167741","messageId":"7vwrhvdhwg.fsf@alter.siamese.dyndns.org","threadId":"27338","inReplyTo":"BANLkTimqJvLoWGxMzeSs9n7LrrLaE-azwQ@mail.gmail.com","subject":"Re: [BUG?] read_directory(), core.ignorecase and pathspec","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2011-05-12T16:04:47Z","receivedAt":"2011-05-12T16:04:47Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Nguyen Thai Ngoc Duy <pclouds@gmail.com> writes:\n\n> I was looking at how read_directory() uses pathspec, and it seems that\n> simplify_away(), the function that cuts out directories early if\n> they're definitely outside given pathspec, does exact match (ie.\n> memcmp) regardless core.ignorecase. This means \"git add -- '*.c'\" may\n> not work as expected when core.ignorecase is on.\n\nI don't think for '*.c' it would make any difference, but it is very\nplausible that 'frotz/*.c' will cull 'Frotz/anything' as \"never going to\nmatch\".\n\n> The whole simplifying thing in read_directory() will eventually be\n> replaced with real pathspec matching as we put more magic in pathspec.\n\nThat should be done not \"as\" but \"before\". Get the foundation right before\ngoing fancier.\n"},{"id":"167765","messageId":"BANLkTimZuzj0o57TOnp8ftnqXse=nRv8HQ@mail.gmail.com","threadId":"27338","inReplyTo":"7vwrhvdhwg.fsf@alter.siamese.dyndns.org","subject":"Re: [BUG?] read_directory(), core.ignorecase and pathspec","fromName":"Nguyen Thai Ngoc Duy","fromEmail":"pclouds@gmail.com","sentAt":"2011-05-13T00:39:31Z","receivedAt":"2011-05-13T00:39:31Z","isPatch":false,"sender":{"key":"pclouds@gmail.com","avatar":"https://avatars.githubusercontent.com/u/720?v=4"},"body":"On Thu, May 12, 2011 at 11:04 PM, Junio C Hamano <gitster@pobox.com> wrote:\n> Nguyen Thai Ngoc Duy <pclouds@gmail.com> writes:\n>\n>> I was looking at how read_directory() uses pathspec, and it seems that\n>> simplify_away(), the function that cuts out directories early if\n>> they're definitely outside given pathspec, does exact match (ie.\n>> memcmp) regardless core.ignorecase. This means \"git add -- '*.c'\" may\n>> not work as expected when core.ignorecase is on.\n>\n> I don't think for '*.c' it would make any difference, but it is very\n> plausible that 'frotz/*.c' will cull 'Frotz/anything' as \"never going to\n> match\".\n\nRight, it only checks prefix.\n\n>> The whole simplifying thing in read_directory() will eventually be\n>> replaced with real pathspec matching as we put more magic in pathspec.\n>\n> That should be done not \"as\" but \"before\". Get the foundation right before\n> going fancier.\n>\n\nRight, again.\n-- \nDuy\n"}]}