diff options
Diffstat (limited to 'read-cache.c')
-rw-r--r-- | read-cache.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/read-cache.c b/read-cache.c index 8f3e9eb314..9cff715d6b 100644 --- a/read-cache.c +++ b/read-cache.c @@ -17,6 +17,7 @@ #include "varint.h" #include "split-index.h" #include "sigchain.h" +#include "utf8.h" static struct cache_entry *refresh_cache_entry(struct cache_entry *ce, unsigned int options); @@ -776,9 +777,10 @@ static int verify_dotfile(const char *rest) * shares the path end test with the ".." case. */ case 'g': - if (rest[1] != 'i') + case 'G': + if (rest[1] != 'i' && rest[1] != 'I') break; - if (rest[2] != 't') + if (rest[2] != 't' && rest[2] != 'T') break; rest += 2; /* fallthrough */ @@ -802,6 +804,10 @@ int verify_path(const char *path) return 1; if (is_dir_sep(c)) { inside: + if (protect_hfs && is_hfs_dotgit(path)) + return 0; + if (protect_ntfs && is_ntfs_dotgit(path)) + return 0; c = *path++; if ((c == '.' && !verify_dotfile(path)) || is_dir_sep(c) || c == '\0') |