summaryrefslogtreecommitdiff
path: root/fsck.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2014-12-17 19:20:31 (GMT)
committerJunio C Hamano <gitster@pobox.com>2014-12-17 19:20:31 (GMT)
commit6898b797218ca1f25818d813318b387d965dc1bb (patch)
treeeb41620da7ea49019cb97161646318f54225d647 /fsck.c
parent9181365b856a63f8c5486ad0fe48f1cd60852da3 (diff)
parent5c8213a7696b3d9e29feda2516e350d03d7bd9a4 (diff)
downloadgit-6898b797218ca1f25818d813318b387d965dc1bb.zip
git-6898b797218ca1f25818d813318b387d965dc1bb.tar.gz
git-6898b797218ca1f25818d813318b387d965dc1bb.tar.bz2
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.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/fsck.c b/fsck.c
index 64bf279..ee7f531 100644
--- a/fsck.c
+++ b/fsck.c
@@ -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);