aboutsummaryrefslogtreecommitdiff
path: root/fast-import.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2010-12-03 16:10:34 -0800
committerJunio C Hamano <gitster@pobox.com>2010-12-03 16:10:34 -0800
commit5e738ae820ec53c45895b029baa3a1f63e654b1b (patch)
tree80624092ee1bf2ae435fc220e6f529f096e2a039 /fast-import.c
parentb281796eeb925f5e91d27cd6c6c579c925577160 (diff)
parent50906e04e8f48215b0b09841686709b92a2ab2e4 (diff)
downloadgit-5e738ae820ec53c45895b029baa3a1f63e654b1b.tar.gz
git-5e738ae820ec53c45895b029baa3a1f63e654b1b.tar.xz
Merge branch 'jj/icase-directory'
* jj/icase-directory: Support case folding in git fast-import when core.ignorecase=true Support case folding for git add when core.ignorecase=true Add case insensitivity support when using git ls-files Add case insensitivity support for directories when using git status Case insensitivity support for .gitignore via core.ignorecase Add string comparison functions that respect the ignore_case variable. Makefile & configure: add a NO_FNMATCH_CASEFOLD flag Makefile & configure: add a NO_FNMATCH flag Conflicts: Makefile config.mak.in configure.ac fast-import.c
Diffstat (limited to 'fast-import.c')
-rw-r--r--fast-import.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/fast-import.c b/fast-import.c
index 8263dbe84..534c68db6 100644
--- a/fast-import.c
+++ b/fast-import.c
@@ -156,6 +156,7 @@ Format of STDIN stream:
#include "csum-file.h"
#include "quote.h"
#include "exec_cmd.h"
+#include "dir.h"
#define PACK_ID_BITS 16
#define MAX_PACK_ID ((1<<PACK_ID_BITS)-1)
@@ -1478,7 +1479,7 @@ static int tree_content_set(
t = root->tree;
for (i = 0; i < t->entry_count; i++) {
e = t->entries[i];
- if (e->name->str_len == n && !strncmp(p, e->name->str_dat, n)) {
+ if (e->name->str_len == n && !strncmp_icase(p, e->name->str_dat, n)) {
if (!slash1) {
if (!S_ISDIR(mode)
&& e->versions[1].mode == mode
@@ -1547,7 +1548,7 @@ static int tree_content_remove(
t = root->tree;
for (i = 0; i < t->entry_count; i++) {
e = t->entries[i];
- if (e->name->str_len == n && !strncmp(p, e->name->str_dat, n)) {
+ if (e->name->str_len == n && !strncmp_icase(p, e->name->str_dat, n)) {
if (slash1 && !S_ISDIR(e->versions[1].mode))
/*
* If p names a file in some subdirectory, and a
@@ -1608,7 +1609,7 @@ static int tree_content_get(
t = root->tree;
for (i = 0; i < t->entry_count; i++) {
e = t->entries[i];
- if (e->name->str_len == n && !strncmp(p, e->name->str_dat, n)) {
+ if (e->name->str_len == n && !strncmp_icase(p, e->name->str_dat, n)) {
if (!slash1) {
memcpy(leaf, e, sizeof(*leaf));
if (e->tree && is_null_sha1(e->versions[1].sha1))