From: "Nguyễn Thái Ngọc Duy" <pclouds@gmail.com>
To: git@vger.kernel.org, Junio C Hamano <gitster@pobox.com>,
Joshua Jensen <jjensen@workspacewhiz.com>
Cc: "Nguyễn Thái Ngọc Duy" <pclouds@gmail.com>
Subject: [PATCH] Add case insensitive support in matching pathspec
Date: Thu, 3 Feb 2011 23:38:26 +0700 [thread overview]
Message-ID: <1296751106-15316-1-git-send-email-pclouds@gmail.com> (raw)
Commit 21444f1 (Add case insensitivity support when using git ls-files
- 2010-10-03) teaches match_pathspec() to ignore case when
core.ignorecase=true.
match_pathspec_depth() is developed independently and does not have
this feature. Teach it.
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
---
On top of nd/struct-pathspec, but requires jj/icase-directory. I can
rebase the series on top of master if it causes too many conflicts.
dir.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/dir.c b/dir.c
index b1407a5..2597f81 100644
--- a/dir.c
+++ b/dir.c
@@ -192,7 +192,7 @@ static int match_pathspec_item(const struct pathspec_item *item, int prefix,
if (!*match)
return MATCHED_RECURSIVELY;
- if (matchlen <= namelen && !strncmp(match, name, matchlen)) {
+ if (matchlen <= namelen && !strncmp_icase(match, name, matchlen)) {
if (matchlen == namelen)
return MATCHED_EXACTLY;
@@ -200,7 +200,7 @@ static int match_pathspec_item(const struct pathspec_item *item, int prefix,
return MATCHED_RECURSIVELY;
}
- if (item->has_wildcard && !fnmatch(match, name, 0))
+ if (item->has_wildcard && !fnmatch_icase(match, name, 0))
return MATCHED_FNMATCH;
return 0;
--
1.7.2.2
next reply other threads:[~2011-02-03 16:40 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-02-03 16:38 Nguyễn Thái Ngọc Duy [this message]
2011-02-03 20:17 ` [PATCH] Add case insensitive support in matching pathspec Johannes Sixt
2011-02-04 13:00 ` Nguyen Thai Ngoc Duy
2011-02-04 23:06 ` Junio C Hamano
2011-02-05 4:14 ` Nguyen Thai Ngoc Duy
2011-02-03 22:14 ` Junio C Hamano
2011-02-05 7:44 ` Nguyen Thai Ngoc Duy
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=1296751106-15316-1-git-send-email-pclouds@gmail.com \
--to=pclouds@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=jjensen@workspacewhiz.com \
/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).