Add 'core.ignorecase' option
..and start using it for directory entry traversal (ie "git status" will not consider entries that match an existing entry case-insensitively to be a new file) Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>maint
parent
cd2fef59ed
commit
0a9b88b7de
1
cache.h
1
cache.h
|
@ -407,6 +407,7 @@ extern int delete_ref(const char *, const unsigned char *sha1);
|
||||||
extern int trust_executable_bit;
|
extern int trust_executable_bit;
|
||||||
extern int quote_path_fully;
|
extern int quote_path_fully;
|
||||||
extern int has_symlinks;
|
extern int has_symlinks;
|
||||||
|
extern int ignore_case;
|
||||||
extern int assume_unchanged;
|
extern int assume_unchanged;
|
||||||
extern int prefer_symlink_refs;
|
extern int prefer_symlink_refs;
|
||||||
extern int log_all_ref_updates;
|
extern int log_all_ref_updates;
|
||||||
|
|
5
config.c
5
config.c
|
@ -342,6 +342,11 @@ int git_default_config(const char *var, const char *value)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!strcmp(var, "core.ignorecase")) {
|
||||||
|
ignore_case = git_config_bool(var, value);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
if (!strcmp(var, "core.bare")) {
|
if (!strcmp(var, "core.bare")) {
|
||||||
is_bare_repository_cfg = git_config_bool(var, value);
|
is_bare_repository_cfg = git_config_bool(var, value);
|
||||||
return 0;
|
return 0;
|
||||||
|
|
2
dir.c
2
dir.c
|
@ -371,7 +371,7 @@ static struct dir_entry *dir_entry_new(const char *pathname, int len)
|
||||||
|
|
||||||
struct dir_entry *dir_add_name(struct dir_struct *dir, const char *pathname, int len)
|
struct dir_entry *dir_add_name(struct dir_struct *dir, const char *pathname, int len)
|
||||||
{
|
{
|
||||||
if (cache_name_exists(pathname, len, 0))
|
if (cache_name_exists(pathname, len, ignore_case))
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
ALLOC_GROW(dir->entries, dir->nr+1, dir->alloc);
|
ALLOC_GROW(dir->entries, dir->nr+1, dir->alloc);
|
||||||
|
|
|
@ -14,6 +14,7 @@ char git_default_name[MAX_GITNAME];
|
||||||
int trust_executable_bit = 1;
|
int trust_executable_bit = 1;
|
||||||
int quote_path_fully = 1;
|
int quote_path_fully = 1;
|
||||||
int has_symlinks = 1;
|
int has_symlinks = 1;
|
||||||
|
int ignore_case;
|
||||||
int assume_unchanged;
|
int assume_unchanged;
|
||||||
int prefer_symlink_refs;
|
int prefer_symlink_refs;
|
||||||
int is_bare_repository_cfg = -1; /* unspecified */
|
int is_bare_repository_cfg = -1; /* unspecified */
|
||||||
|
|
Loading…
Reference in New Issue