[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=truedir.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(-)