diff options
author | Junio C Hamano <gitster@pobox.com> | 2014-12-17 20:20:31 +0100 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2014-12-17 20:20:31 +0100 |
commit | 6898b797218ca1f25818d813318b387d965dc1bb (patch) | |
tree | eb41620da7ea49019cb97161646318f54225d647 /fsck.c | |
parent | Merge branch 'maint-1.8.5' into maint-1.9 (diff) | |
parent | Git 1.8.5.6 (diff) | |
download | git-6898b797218ca1f25818d813318b387d965dc1bb.tar.xz git-6898b797218ca1f25818d813318b387d965dc1bb.zip |
Sync with v1.8.5.6
* maint-1.8.5:
Git 1.8.5.6
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); |