diff -ruN git-2.9.3/fsck.c git-2.9.3_patched/fsck.c --- git-2.9.3/fsck.c 2018-10-29 17:34:24.023464636 +0100 +++ git-2.9.3_patched/fsck.c 2018-10-29 17:37:41.345363601 +0100 @@ -94,7 +94,9 @@ FUNC(GITMODULES_BLOB, ERROR) \ FUNC(GITMODULES_PARSE, ERROR) \ FUNC(GITMODULES_NAME, ERROR) \ + FUNC(GITMODULES_PATH, ERROR) \ FUNC(GITMODULES_SYMLINK, ERROR) \ + FUNC(GITMODULES_URL, ERROR) \ /* warnings */ \ FUNC(BAD_FILEMODE, WARN) \ FUNC(EMPTY_NAME, WARN) \ @@ -872,6 +874,20 @@ FSCK_MSG_GITMODULES_NAME, "disallowed submodule name: %s", name); + + if (!strcmp(key, "path") && value && + looks_like_command_line_option(value)) + data->ret |= report(data->options, data->obj, + FSCK_MSG_GITMODULES_PATH, + "disallowed submodule path: %s", + value); + + if (!strcmp(key, "url") && value && + looks_like_command_line_option(value)) + data->ret |= report(data->options, data->obj, + FSCK_MSG_GITMODULES_URL, + "disallowed submodule url: %s", + value); free(name); return 0;