git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* [PATCH 0/6] Extensions of core.ignorecase=true support
@ 2010-08-16 19:38 Johannes Sixt
  2010-08-16 19:38 ` [PATCH 1/6] Add string comparison functions that respect the ignore_case variable Johannes Sixt
                   ` (7 more replies)
  0 siblings, 8 replies; 26+ messages in thread
From: Johannes Sixt @ 2010-08-16 19:38 UTC (permalink / raw)
  To: git; +Cc: Johannes Sixt, Joshua Jensen

The following patch series extends the core.ignorecase=true support to
handle case insensitive comparisons for the .gitignore file, git status,
and git ls-files.  git add and git fast-import will fold the case of the
file being added, matching that of an already added directory entry.  Case
folding is also applied to git fast-import for renames, copies, and deletes.

The most notable benefit, IMO, is that the case of directories in the
worktree does not matter if, and only if, the directory exists already in
the index with some different case variant.  This helps applications on
Windows that change the case even of directories in unpredictable ways.
Joshua mentioned Perforce as the primary example.

Concerning the implementation, Joshua explained when he initially submitted
the series to the msysgit mailing list:

 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 git add path case folding functionality is a somewhat radical 
 departure from what Git does now. It is described in detail in patch 5. 
 Does anyone have any concerns?

I support the idea of this patch, and I can confirm that it works: I've
used this series in production both with core.ignorecase set to true and
to false, and in the former case, with directories and files with case
different from the index.

Joshua Jensen (6):
  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
  Support case folding for git add when core.ignorecase=true
  Support case folding in git fast-import when core.ignorecase=true

 dir.c         |  105 ++++++++++++++++++++++++++++++++++++++++++++++----------
 dir.h         |    4 ++
 fast-import.c |    7 ++--
 name-hash.c   |   72 ++++++++++++++++++++++++++++++++++++++-
 read-cache.c  |   23 ++++++++++++
 5 files changed, 188 insertions(+), 23 deletions(-)

^ permalink raw reply	[flat|nested] 26+ messages in thread

end of thread, other threads:[~2010-08-30 20:13 UTC | newest]

Thread overview: 26+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-08-16 19:38 [PATCH 0/6] Extensions of core.ignorecase=true support Johannes Sixt
2010-08-16 19:38 ` [PATCH 1/6] Add string comparison functions that respect the ignore_case variable Johannes Sixt
2010-08-18 12:52   ` Ævar Arnfjörð Bjarmason
2010-08-18 12:53     ` Ævar Arnfjörð Bjarmason
2010-08-18 15:52       ` Joshua Jensen
2010-08-18 16:07         ` Ævar Arnfjörð Bjarmason
2010-08-18 18:32           ` Johannes Sixt
2010-08-18 18:58             ` Ævar Arnfjörð Bjarmason
2010-08-29 19:39             ` Ævar Arnfjörð Bjarmason
2010-08-30 14:42               ` Joshua Jensen
2010-08-30 14:51                 ` Ævar Arnfjörð Bjarmason
2010-08-30 15:05                   ` Jonathan Nieder
2010-08-30 14:52                 ` Jonathan Nieder
2010-08-30 18:40                 ` Johannes Sixt
2010-08-30 19:57                   ` Ævar Arnfjörð Bjarmason
2010-08-30 20:13                     ` Johannes Sixt
2010-08-16 19:38 ` [PATCH 2/6] Case insensitivity support for .gitignore via core.ignorecase Johannes Sixt
2010-08-16 19:38 ` [PATCH 3/6] Add case insensitivity support for directories when using git status Johannes Sixt
2010-08-16 19:38 ` [PATCH 4/6] Add case insensitivity support when using git ls-files Johannes Sixt
2010-08-16 19:38 ` [PATCH 5/6] Support case folding for git add when core.ignorecase=true Johannes Sixt
2010-08-16 19:38 ` [PATCH 6/6] Support case folding in git fast-import " Johannes Sixt
2010-08-17 19:36 ` [PATCH 0/6] Extensions of core.ignorecase=true support Robert Buck
2010-08-17 21:20   ` Johannes Sixt
2010-08-18  2:41     ` Robert Buck
2010-08-18 18:31       ` Johannes Sixt
2010-08-22  7:23 ` Junio C Hamano

Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).