From: Junio C Hamano Date: Tue, 10 Dec 2019 06:17:55 +0000 (-0800) Subject: Sync with Git 2.24.1 X-Git-Tag: v2.25.0-rc0~54 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=7034cd094bda4edbcdff7fad1a28fcaaf9b9a040;p=thirdparty%2Fgit.git Sync with Git 2.24.1 --- 7034cd094bda4edbcdff7fad1a28fcaaf9b9a040 diff --cc fsck.c index ac4ba4c8e8,ef8b343a72..640d813d84 --- a/fsck.c +++ b/fsck.c @@@ -618,8 -593,24 +619,24 @@@ static int fsck_tree(const struct objec ".gitmodules is a symbolic link"); } + if ((backslash = strchr(name, '\\'))) { + while (backslash) { + backslash++; + has_dotgit |= is_ntfs_dotgit(backslash); + if (is_ntfs_dotgitmodules(backslash)) { + if (!S_ISLNK(mode)) + oidset_insert(&gitmodules_found, oid); + else - retval += report(options, &item->object, ++ retval += report(options, oid, OBJ_TREE, + FSCK_MSG_GITMODULES_SYMLINK, + ".gitmodules is a symbolic link"); + } + backslash = strchr(backslash, '\\'); + } + } + if (update_tree_entry_gently(&desc)) { - retval += report(options, &item->object, FSCK_MSG_BAD_TREE, "cannot be parsed as a tree"); + retval += report(options, oid, OBJ_TREE, FSCK_MSG_BAD_TREE, "cannot be parsed as a tree"); break; } @@@ -931,6 -982,12 +948,12 @@@ static int fsck_gitmodules_fn(const cha FSCK_MSG_GITMODULES_PATH, "disallowed submodule path: %s", value); + if (!strcmp(key, "update") && value && + parse_submodule_update_type(value) == SM_UPDATE_COMMAND) - data->ret |= report(data->options, data->obj, ++ data->ret |= report(data->options, data->oid, OBJ_BLOB, + FSCK_MSG_GITMODULES_UPDATE, + "disallowed submodule update setting: %s", + value); free(name); return 0;