diff options
| author | Justin Tobler <jltobler@gmail.com> | 2025-01-07 10:29:15 -0600 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2025-01-07 09:22:25 -0800 |
| commit | ca7158076f9f6e0ee1c84595aaf44194a9880a72 (patch) | |
| tree | 38011f308bcc391b89010260c49a8bb7c7d7ba6d /builtin | |
| parent | Git 2.48-rc1 (diff) | |
| download | git-ca7158076f9f6e0ee1c84595aaf44194a9880a72.tar.gz git-ca7158076f9f6e0ee1c84595aaf44194a9880a72.zip | |
fsck: reject misconfigured fsck.skipList
In Git, fsck operations can ignore known broken objects via the
`fsck.skipList` configuration. This option expects a path to a file with
the list of object names. When the configuration is specified without a
path, an error message is printed, but the command continues as if the
configuration was not set. Configuring `fsck.skipList` without a value
is a misconfiguration so config parsing should be more strict and reject
it.
Update `git_fsck_config()` to no longer ignore misconfiguration of
`fsck.skipList`. The same behavior is also present for
`fetch.fsck.skipList` and `receive.fsck.skipList` so the configuration
parsers for these are updated to ensure the related operations remain
consistent.
Signed-off-by: Justin Tobler <jltobler@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin')
| -rw-r--r-- | builtin/receive-pack.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/builtin/receive-pack.c b/builtin/receive-pack.c index c2e9103f11..0158faf537 100644 --- a/builtin/receive-pack.c +++ b/builtin/receive-pack.c @@ -174,7 +174,7 @@ static int receive_pack_config(const char *var, const char *value, char *path; if (git_config_pathname(&path, var, value)) - return 1; + return -1; strbuf_addf(&fsck_msg_types, "%cskiplist=%s", fsck_msg_types.len ? ',' : '=', path); free(path); |
