diff options
author | Junio C Hamano <gitster@pobox.com> | 2018-09-27 21:45:01 +0300 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2018-09-27 21:45:01 +0300 |
commit | 44f87dac99574a8073ffb1ba8b10bd4d3945f61b (patch) | |
tree | 75d621c381b5af0d9312d69ff6a7d96c9f0cf676 /fsck.c | |
parent | 53f9a3e157dbbc901a02ac2c73346d375e24978c (diff) | |
parent | 6e9e91e9cae74cd7feb9300563d40361b2b17dd2 (diff) |
Sync with 2.17.2
* maint-2.17:
Git 2.17.2
fsck: detect submodule paths starting with dash
fsck: detect submodule urls starting with dash
Git 2.16.5
Git 2.15.3
Git 2.14.5
submodule-config: ban submodule paths that start with a dash
submodule-config: ban submodule urls that start with dash
submodule--helper: use "--" to signal end of clone options
Diffstat (limited to 'fsck.c')
-rw-r--r-- | fsck.c | 14 |
1 files changed, 14 insertions, 0 deletions
@@ -64,6 +64,8 @@ static struct oidset gitmodules_done = OIDSET_INIT; FUNC(GITMODULES_PARSE, ERROR) \ FUNC(GITMODULES_NAME, ERROR) \ FUNC(GITMODULES_SYMLINK, ERROR) \ + FUNC(GITMODULES_URL, ERROR) \ + FUNC(GITMODULES_PATH, ERROR) \ /* warnings */ \ FUNC(BAD_FILEMODE, WARN) \ FUNC(EMPTY_NAME, WARN) \ @@ -949,6 +951,18 @@ static int fsck_gitmodules_fn(const char *var, const char *value, void *vdata) FSCK_MSG_GITMODULES_NAME, "disallowed submodule name: %s", name); + 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); + 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); free(name); return 0; |