diff options
author | Junio C Hamano <gitster@pobox.com> | 2014-12-17 11:11:15 -0800 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2014-12-17 11:11:15 -0800 |
commit | 2aa910084681a6cbfb0928b2d9c4d0f9ce54e1b8 (patch) | |
tree | 1aeb9ab0f337c278560d7ea72deb21f9c5e45de7 /fsck.c | |
parent | eeff891ac756fd97a05476446f15269b714ce4cc (diff) | |
parent | d08c13b947335cc48ecc1a8453d97b7147c2d6d6 (diff) | |
download | git-2aa910084681a6cbfb0928b2d9c4d0f9ce54e1b8.tar.gz |
Merge branch 'dotgit-case-maint-1.8.5' into maint-1.8.5
* dotgit-case-maint-1.8.5:
fsck: complain about NTFS ".git" aliases in trees
read-cache: optionally disallow NTFS .git variants
path: add is_ntfs_dotgit() helper
fsck: complain about HFS+ ".git" aliases in trees
read-cache: optionally disallow HFS+ .git variants
utf8: add is_hfs_dotgit() helper
fsck: notice .git case-insensitively
t1450: refactor ".", "..", and ".git" fsck tests
verify_dotfile(): reject .git case-insensitively
read-tree: add tests for confusing paths like ".." and ".git"
unpack-trees: propagate errors adding entries to the index
Diffstat (limited to 'fsck.c')
-rw-r--r-- | fsck.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -6,6 +6,7 @@ #include "commit.h" #include "tag.h" #include "fsck.h" +#include "utf8.h" static int fsck_walk_tree(struct tree *tree, fsck_walk_func walk, void *data) { @@ -175,7 +176,8 @@ static int fsck_tree(struct tree *item, int strict, fsck_error error_func) has_dot = 1; if (!strcmp(name, "..")) has_dotdot = 1; - if (!strcmp(name, ".git")) + if (!strcasecmp(name, ".git") || is_hfs_dotgit(name) || + is_ntfs_dotgit(name)) has_dotgit = 1; has_zero_pad |= *(char *)desc.buffer == '0'; update_tree_entry(&desc); |