From: Joshua Jensen <jjensen@workspacewhiz.com>
To: git@vger.kernel.org
Cc: j6t@kdbg.org
Subject: [PATCH v2 0/6] Extensions of core.ignorecase=true support
Date: Sat, 02 Oct 2010 22:32:21 -0600 [thread overview]
Message-ID: <20101003043221.1960.73178.stgit@SlamDunk> (raw)
The second version of this patch series fixes the problematic case
insensitive fnmatch call in patch 1 that relied on an apparently GNU-only
extension. Instead, the pattern and string are lowercased into
temporary buffers, and the standard fnmatch is called without relying
on the GNU extension.
Patches 2-6 received no modifications.
The original cover for the patch series follows as posted by Johannes Sixt:
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 | 152 ++++++++++++++++++++++++++++++++++++++++++++++++++-------
dir.h | 4 ++
fast-import.c | 7 ++-
name-hash.c | 72 +++++++++++++++++++++++++++
read-cache.c | 23 +++++++++
5 files changed, 235 insertions(+), 23 deletions(-)
next reply other threads:[~2010-10-03 4:32 UTC|newest]
Thread overview: 45+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-10-03 4:32 Joshua Jensen [this message]
2010-10-03 4:32 ` [PATCH v2 1/6] Add string comparison functions that respect the ignore_case variable Joshua Jensen
2010-10-03 8:30 ` Ævar Arnfjörð Bjarmason
2010-10-03 9:07 ` Joshua Jensen
2010-10-03 9:56 ` [PATCH/RFC v3 0/8] ab/icase-directory: jj/icase-directory with Makefile + configure checks Ævar Arnfjörð Bjarmason
2010-10-03 9:56 ` [PATCH/RFC v3 1/8] Makefile & configure: add a NO_FNMATCH flag Ævar Arnfjörð Bjarmason
2010-10-03 9:56 ` [PATCH/RFC v3 2/8] Makefile & configure: add a NO_FNMATCH_CASEFOLD flag Ævar Arnfjörð Bjarmason
2010-10-03 17:58 ` Johannes Sixt
2010-10-04 2:48 ` [PATCH/RFC v4 " Ævar Arnfjörð Bjarmason
2010-10-03 9:56 ` [PATCH/RFC v3 3/8] Add string comparison functions that respect the ignore_case variable Ævar Arnfjörð Bjarmason
2010-10-03 9:56 ` [PATCH/RFC v3 4/8] Case insensitivity support for .gitignore via core.ignorecase Ævar Arnfjörð Bjarmason
2010-10-03 9:56 ` [PATCH/RFC v3 5/8] Add case insensitivity support for directories when using git status Ævar Arnfjörð Bjarmason
2010-10-03 9:56 ` [PATCH/RFC v3 6/8] Add case insensitivity support when using git ls-files Ævar Arnfjörð Bjarmason
2010-10-03 11:54 ` Thomas Adam
2010-10-03 18:19 ` Johannes Sixt
2010-10-03 21:59 ` Thomas Adam
2010-10-04 7:49 ` Jonathan Nieder
2010-10-04 8:02 ` Ævar Arnfjörð Bjarmason
2010-10-04 14:03 ` Erik Faye-Lund
2010-10-04 14:58 ` Joshua Jensen
2010-10-04 17:03 ` Jonathan Nieder
2010-10-04 16:02 ` Robin Rosenberg
2010-10-04 16:41 ` Ævar Arnfjörð Bjarmason
2010-10-04 16:48 ` Erik Faye-Lund
2010-10-04 16:49 ` Joshua Jensen
2010-10-04 17:08 ` Jonathan Nieder
2010-10-04 17:53 ` Ævar Arnfjörð Bjarmason
2010-10-04 19:02 ` Johannes Sixt
2010-10-04 19:17 ` Ævar Arnfjörð Bjarmason
2010-10-03 9:56 ` [PATCH/RFC v3 7/8] Support case folding for git add when core.ignorecase=true Ævar Arnfjörð Bjarmason
2010-10-03 9:56 ` [PATCH/RFC v3 8/8] Support case folding in git fast-import " Ævar Arnfjörð Bjarmason
2010-10-07 4:13 ` [PATCH v2 1/6] Add string comparison functions that respect the ignore_case variable Junio C Hamano
2010-10-07 5:48 ` Joshua Jensen
2010-10-03 4:32 ` [PATCH v2 2/6] Case insensitivity support for .gitignore via core.ignorecase Joshua Jensen
2010-10-03 4:32 ` [PATCH v2 3/6] Add case insensitivity support for directories when using git status Joshua Jensen
2010-10-03 4:32 ` [PATCH v2 4/6] Add case insensitivity support when using git ls-files Joshua Jensen
2010-10-03 4:32 ` [PATCH v2 5/6] Support case folding for git add when core.ignorecase=true Joshua Jensen
2010-10-03 4:32 ` [PATCH v2 6/6] Support case folding in git fast-import " Joshua Jensen
2010-10-03 13:00 ` Sverre Rabbelier
2010-10-03 8:17 ` [PATCH v2 0/6] Extensions of core.ignorecase=true support Johannes Sixt
2010-10-03 23:34 ` Junio C Hamano
2010-10-03 11:48 ` Robert Buck
2010-10-03 18:12 ` Johannes Sixt
2010-10-06 22:04 ` Robert Buck
2010-10-06 22:46 ` Joshua Jensen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20101003043221.1960.73178.stgit@SlamDunk \
--to=jjensen@workspacewhiz.com \
--cc=git@vger.kernel.org \
--cc=j6t@kdbg.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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 NNTP newsgroup(s).