git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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

From
Nguyen Thai Ngoc Duy <pclouds@gmail.com>
Date
May 13, 2011, 00:39 UTC
Message-ID
<BANLkTimZuzj0o57TOnp8ftnqXse=nRv8HQ@mail.gmail.com>
In-Reply-To
<7vwrhvdhwg.fsf@alter.siamese.dyndns.org>
On Thu, May 12, 2011 at 11:04 PM, Junio C Hamano <gitster@pobox.com> wrote:
Show 11 quoted lines
> Nguyen Thai Ngoc Duy <pclouds@gmail.com> 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".
Right, it only checks prefix.
Show 6 quoted lines
>> 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
Previous: Junio C Hamano
Message 3 of 3 in “[BUG?] read_directory(), core.ignorecase and pathspec”
  1. Nguyen Thai Ngoc DuyMay 12, 2011
  2. Junio C HamanoMay 12, 2011
  3. Nguyen Thai Ngoc DuyMay 13, 2011

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.