[PATCH 7/7] Support case folding in git fast-import when core.ignorecase=true
- From
Joshua Jensen <jjensen@workspacewhiz.com>
- Date
- May 21, 2010, 04:50 UTC
- Message-ID
- <1274417435-2344-8-git-send-email-jjensen@workspacewhiz.com>
- In-Reply-To
- <1274417435-2344-1-git-send-email-jjensen@workspacewhiz.com>
When core.ignorecase=true, imported file paths will be folded to match existing directory case.
Signed-off-by: Joshua Jensen <jjensen@workspacewhiz.com> --- fast-import.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/fast-import.c b/fast-import.c index 352e2e3..2279276 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) @@ -1459,7 +1460,7 @@ static int tree_content_set( 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
-- 1.7.1.1930.gca7dd4