summaryrefslogtreecommitdiff
path: root/fsck.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2014-12-17 11:11:15 -0800
committerJunio C Hamano <gitster@pobox.com>2014-12-17 11:11:15 -0800
commit2aa910084681a6cbfb0928b2d9c4d0f9ce54e1b8 (patch)
tree1aeb9ab0f337c278560d7ea72deb21f9c5e45de7 /fsck.c
parenteeff891ac756fd97a05476446f15269b714ce4cc (diff)
parentd08c13b947335cc48ecc1a8453d97b7147c2d6d6 (diff)
downloadgit-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.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/fsck.c b/fsck.c
index 99c0497674..0b76de6f68 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);