summaryrefslogtreecommitdiff
path: root/fsck.c
diff options
context:
space:
mode:
authorDongHun Kwak <dh0128.kwak@samsung.com>2021-03-03 15:16:31 +0900
committerDongHun Kwak <dh0128.kwak@samsung.com>2021-03-03 15:16:31 +0900
commitf7231934dc7ec05ec0d13f8d957585c6045b79d6 (patch)
tree7559210ff6eac1c423e2c2832f9053ebd76a566f /fsck.c
parentfd5a92e7391280e6c930a2e60e8ea08bbdc8a378 (diff)
downloadgit-f7231934dc7ec05ec0d13f8d957585c6045b79d6.tar.gz
git-f7231934dc7ec05ec0d13f8d957585c6045b79d6.tar.bz2
git-f7231934dc7ec05ec0d13f8d957585c6045b79d6.zip
Imported Upstream version 2.16.6upstream/2.16.6
Diffstat (limited to 'fsck.c')
-rw-r--r--fsck.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/fsck.c b/fsck.c
index 032699e9..0b2b93aa 100644
--- a/fsck.c
+++ b/fsck.c
@@ -551,7 +551,7 @@ static int fsck_tree(struct tree *item, struct fsck_options *options)
while (desc.size) {
unsigned mode;
- const char *name;
+ const char *name, *backslash;
const struct object_id *oid;
oid = tree_entry_extract(&desc, &name, &mode);
@@ -565,6 +565,15 @@ static int fsck_tree(struct tree *item, struct fsck_options *options)
is_hfs_dotgit(name) ||
is_ntfs_dotgit(name));
has_zero_pad |= *(char *)desc.buffer == '0';
+
+ if ((backslash = strchr(name, '\\'))) {
+ while (backslash) {
+ backslash++;
+ has_dotgit |= is_ntfs_dotgit(backslash);
+ backslash = strchr(backslash, '\\');
+ }
+ }
+
if (update_tree_entry_gently(&desc)) {
retval += report(options, &item->object, FSCK_MSG_BAD_TREE, "cannot be parsed as a tree");
break;