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

Re: [PATCH 1/6] Add string comparison functions that respect the ignore_case variable.

From
Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Date
Aug 18, 2010, 16:07 UTC
Message-ID
<AANLkTinwQqwjmeNfiUE6LiZtbBhEEFyisZXUgF9_b+2Q@mail.gmail.com>
In-Reply-To
<4C6C01A9.4080306@workspacewhiz.com>
On Wed, Aug 18, 2010 at 15:52, Joshua Jensen <jjensen@workspacewhiz.com> wrote:
Show 34 quoted lines
>  ----- Original Message -----
> From: Ævar Arnfjörð Bjarmason
> Date: 8/18/2010 6:53 AM
>>
>> On Wed, Aug 18, 2010 at 12:52, Ævar Arnfjörð Bjarmason<avarab@gmail.com>
>>  wrote:
>>>
>>> On Mon, Aug 16, 2010 at 19:38, Johannes Sixt<j6t@kdbg.org>  wrote:
>>>>
>>>> +       return fnmatch(pattern, string, flags | (ignore_case ?
>>>> FNM_CASEFOLD : 0));
>>>
>>> On Solaris 10:
>>>
>>> dir.c: In function `fnmatch_icase':
>>> dir.c:34: error: `FNM_CASEFOLD' undeclared (first use in this function)
>>> dir.c:34: error: (Each undeclared identifier is reported only once
>>> dir.c:34: error: for each function it appears in.)
>>
>> Actually, reading the fnmatch manpage it's not just Solaris, but all
>> non-GNU systems:
>>
>>        FNM_CASEFOLD - If this flag (a GNU extension) is set, the pattern
>> is matched case-insensitively
>
> Well, that's no good.  :(
>
> Thanks for the research.  It helps tremendously.
>
> One easy way out of this situation would be to duplicate the GNU fnmatch()
> into fnmatch_icase().  I have not looked at the source code, so it may not
> be possible.  If it can be copied in, does anyone object?
>
> I'll also look for a non-GNU function that may work.

According to some further research at least FreeBSD and NetBSD have copied this GNU extension. You may find their versions easier to integrate.

Previous: Joshua JensenNext: Johannes Sixt
Message 6 of 26 in “Extensions of core.ignorecase=true support”
  1. 0/6 Extensions of core.ignorecase=true supportJohannes Sixt, Aug 16, 2010
  2. 1/6 Add string comparison functions that respect the ignore_case variable.Johannes Sixt, Aug 16, 2010
  3. Ævar Arnfjörð BjarmasonAug 18, 2010
  4. Ævar Arnfjörð BjarmasonAug 18, 2010
  5. Joshua JensenAug 18, 2010
  6. Ævar Arnfjörð BjarmasonAug 18, 2010
  7. Johannes SixtAug 18, 2010
  8. Ævar Arnfjörð BjarmasonAug 18, 2010
  9. Ævar Arnfjörð BjarmasonAug 29, 2010
  10. Joshua JensenAug 30, 2010
  11. Ævar Arnfjörð BjarmasonAug 30, 2010
  12. Jonathan NiederAug 30, 2010
  13. Jonathan NiederAug 30, 2010
  14. Johannes SixtAug 30, 2010
  15. Ævar Arnfjörð BjarmasonAug 30, 2010
  16. Johannes SixtAug 30, 2010
  17. 2/6 Case insensitivity support for .gitignore via core.ignorecaseJohannes Sixt, Aug 16, 2010
  18. 3/6 Add case insensitivity support for directories when using git statusJohannes Sixt, Aug 16, 2010
  19. 4/6 Add case insensitivity support when using git ls-filesJohannes Sixt, Aug 16, 2010
  20. 5/6 Support case folding for git add when core.ignorecase=trueJohannes Sixt, Aug 16, 2010
  21. 6/6 Support case folding in git fast-import when core.ignorecase=trueJohannes Sixt, Aug 16, 2010
  22. Robert BuckAug 17, 2010
  23. Johannes SixtAug 17, 2010
  24. Robert BuckAug 18, 2010
  25. Johannes SixtAug 18, 2010
  26. Junio C HamanoAug 22, 2010

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.