aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--fsck.c3
-rwxr-xr-xt/t1450-fsck.sh9
2 files changed, 9 insertions, 3 deletions
diff --git a/fsck.c b/fsck.c
index b49113bf0..0b76de6f6 100644
--- a/fsck.c
+++ b/fsck.c
@@ -176,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 (!strcasecmp(name, ".git") || is_hfs_dotgit(name))
+ 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);
diff --git a/t/t1450-fsck.sh b/t/t1450-fsck.sh
index 8158b98e6..6edd99a81 100755
--- a/t/t1450-fsck.sh
+++ b/t/t1450-fsck.sh
@@ -251,10 +251,10 @@ while read name path pretty; do
tree=$(git rev-parse HEAD^{tree}) &&
value=$(eval "echo \$$type") &&
printf "$mode $type %s\t%s" "$value" "$path" >bad &&
- git mktree <bad &&
+ bad_tree=$(git mktree <bad) &&
git fsck 2>out &&
cat out &&
- grep "warning.*\\." out
+ grep "warning.*tree $bad_tree" out
)'
done <<-\EOF
100644 blob
@@ -266,6 +266,11 @@ dotdot ..
dotgit .git
dotgit-case .GIT
dotgit-unicode .gI${u200c}T .gI{u200c}T
+dotgit-case2 .Git
+git-tilde1 git~1
+dotgitdot .git.
+dot-backslash-case .\\\\.GIT\\\\foobar
+dotgit-case-backslash .git\\\\foobar
EOF
test_done