diff options
author | Joshua Jensen <jjensen@workspacewhiz.com> | 2010-10-03 09:56:43 +0000 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2010-10-06 11:19:58 -0700 |
commit | 5102c6173c5a1c683dfdd8ccd07528adddd51745 (patch) | |
tree | c36145dd9e065bb9d2011566088044f1d50ff2ae /COPYING | |
parent | Case insensitivity support for .gitignore via core.ignorecase (diff) | |
download | tgif-5102c6173c5a1c683dfdd8ccd07528adddd51745.tar.xz |
Add case insensitivity support for directories when using git status
When using a case preserving but case insensitive file system, directory
case can differ but still refer to the same physical directory. git
status reports the directory with the alternate case as an Untracked
file. (That is, when mydir/filea.txt is added to the repository and
then the directory on disk is renamed from mydir/ to MyDir/, git status
shows MyDir/ as being untracked.)
Support has been added in name-hash.c for hashing directories with a
terminating slash into the name hash. When index_name_exists() is called
with a directory (a name with a terminating slash), the name is not
found via the normal cache_name_compare() call, but it is found in the
slow_same_name() function.
Additionally, in dir.c, directory_exists_in_index_icase() allows newly
added directories deeper in the directory chain to be identified.
Ultimately, it would be better if the file list was read in case
insensitive alphabetical order from disk, but this change seems to
suffice for now.
The end result is the directory is looked up in a case insensitive
manner and does not show in the Untracked files list.
Signed-off-by: Joshua Jensen <jjensen@workspacewhiz.com>
Signed-off-by: Johannes Sixt <j6t@kdbg.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'COPYING')
0 files changed, 0 insertions, 0 deletions