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

[PATCH 0/7] Various updates to make core.ignorecase=true work better

From
Joshua Jensen <jjensen@workspacewhiz.com>
Date
May 21, 2010, 04:50 UTC
Message-ID
<1274417435-2344-1-git-send-email-jjensen@workspacewhiz.com>

This is a follow up patch to one I posted mid last year specifically for making .gitignore entries be processed in a case insensitive manner. I have used the patch with success since then, but I was unable to make the updates requested by list members.

Over the past month, I have been able to clean up the code and extend the core.ignorecase=true support to better handle git status, ls-files, log, add, and fast-import.

git status and add both use an update made to name-hash.c where directories, specifically names with a trailing slash, can be looked up in a case insensitive manner. After trying a myriad of solutions, this seemed to be the cleanest. Does anyone see a problem with embedding the directory names in the same hash as the file names? I couldn't find one, especially since I append a slash to each directory name.

The new directory_exists_in_index_icase() duplicates some of the functionality in directory_exists_in_index(). I don't understand some of the functionality I just mindlessly cloned. Can anyone clue me in on what directory_exists_in_index() achieves in the case of S_ISGITLINK()?

Updating match_one() bought case insensitive matching support for git ls-files? Are there other side effects I haven't found yet?

The git add path case folding functionality is a somewhat radical departure from what Git does now. It is described in detail in patch 6. Does anyone have any concerns?

Joshua Jensen (7):
  Add string comparison functions that respect the ignore_case
    variable.
  Case insensitivity support for .gitignore via core.ignorecase
  Add case insensitivity support for directories when using git status
  Add case insensitivity support when using git ls-files
  Add support for case insensitive directory and file lookups to git
    log
  Support case folding for git add when core.ignorecase=true
  Support case folding in git fast-import when core.ignorecase=true
 dir.c         |  110 +++++++++++++++++++++++++++++++++++++++++++++++----------
 dir.h         |    5 +++
 fast-import.c |    3 +-
 name-hash.c   |   44 ++++++++++++++++++++++-
 read-cache.c  |   16 ++++++++
 tree-diff.c   |    9 +++--
 6 files changed, 162 insertions(+), 25 deletions(-)
Next: Joshua Jensen
Message 1 of 9 in “Various updates to make core.ignorecase=true work better”
  1. 0/7 Various updates to make core.ignorecase=true work betterJoshua Jensen, May 21, 2010
  2. 1/7 Add string comparison functions that respect the ignore_case variable.Joshua Jensen, May 21, 2010
  3. 2/7 Case insensitivity support for .gitignore via core.ignorecaseJoshua Jensen, May 21, 2010
  4. 3/7 Add case insensitivity support for directories when using git statusJoshua Jensen, May 21, 2010
  5. 4/7 Add case insensitivity support when using git ls-filesJoshua Jensen, May 21, 2010
  6. 5/7 Add support for case insensitive directory and file lookups to git logJoshua Jensen, May 21, 2010
  7. 6/7 Support case folding for git add when core.ignorecase=trueJoshua Jensen, May 21, 2010
  8. 7/7 Support case folding in git fast-import when core.ignorecase=trueJoshua Jensen, May 21, 2010
  9. Joshua JensenMay 26, 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.