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

[PATCH 0/4] Honor core.ignorecase for attribute patterns

From
Brandon Casey <drafnel@gmail.com>
Date
Sep 15, 2011, 01:59 UTC
Message-ID
<1316051979-19671-1-git-send-email-drafnel@gmail.com>
In-Reply-To
<5XXEFw0WjtXKd9dpXSxpkskCcgVyG9Db1_zzVSEBNey-kpXSBbmQfYaxZ2Szg6Pbck6hZZTQ5hHzBwG4rhKYXshrdmveEFLPZ9W0V8P_lw@cipher.nrlssc.navy.mil>
On 09/13/2011 11:22 AM, Brandon Casey wrote:
Show 16 quoted lines
> On 09/13/2011 11:05 AM, Jeff King wrote:
>> On Tue, Sep 13, 2011 at 10:15:15AM -0500, Brandon Casey wrote:
>>
>>> ...and I see there is already an fnmatch_icase() in dir.c which adds
>>> FNM_CASEFOLD when the global var ignore_case is set.  So, maybe it's as
>>> easy as:
>>> [...]
>>> -               return (fnmatch(pattern, basename, 0) == 0);
>>> +               return (fnmatch_icase(pattern, basename, 0) == 0);
>>
>> OK, wow. That's exactly the level of easy I was hoping for. Do you want
>> to roll that up into a patch with some tests?
>
> I haven't even tested that it runs. :)  No, I was hoping someone
> who was more interested would finish it, and maybe even test on
> an affected system.

Ok, I lied. Here's a series that needs testing by people on a case-insensitive filesystem and some comments.

The first three patches are just housekeeping and can be accepted independently of the fourth patch which is marked WIP.

The last patch implements the case-insensitive matching of attribute patterns, but I discovered that bad things can happen if git_config() is called more than once. Details are in the patch email.

-Brandon

[PATCH 1/4] attr.c: avoid inappropriate access to strbuf "buf" [PATCH 2/4] cleanup: use internal memory allocation wrapper [PATCH 3/4] builtin/mv.c: plug miniscule memory leak [PATCH 4/4] attr.c: respect core.ignorecase when matching attribute

Next: Brandon Casey
Message 1 of 19 in “Honor core.ignorecase for attribute patterns”
  1. 0/4 Honor core.ignorecase for attribute patternsBrandon Casey, Sep 15, 2011
  2. 1/4 attr.c: avoid inappropriate access to strbuf "buf" memberBrandon Casey, Sep 15, 2011
  3. 2/4 cleanup: use internal memory allocation wrapper functions everywhereBrandon Casey, Sep 15, 2011
  4. Johannes SixtSep 15, 2011
  5. Brandon CaseySep 15, 2011
  6. 3/4 builtin/mv.c: plug miniscule memory leakBrandon Casey, Sep 15, 2011
  7. 4/4 attr.c: respect core.ignorecase when matching attribute patternsBrandon Casey, Sep 15, 2011
  8. Junio C HamanoSep 15, 2011
  9. Junio C HamanoSep 15, 2011
  10. Brandon CaseySep 15, 2011
  11. Jeff KingSep 15, 2011
  12. Brandon CaseySep 15, 2011
  13. Brandon CaseyOct 6, 2011
  14. Johannes SixtOct 6, 2011
  15. Alexey ShumkinOct 6, 2011
  16. Brandon CaseyOct 6, 2011
  17. Erik Faye-LundOct 6, 2011
  18. Erik Faye-LundOct 6, 2011
  19. Brandon CaseyOct 6, 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.