]> git.ipfire.org Git - thirdparty/git.git/commit
fsck: reject misconfigured fsck.skipList
authorJustin Tobler <jltobler@gmail.com>
Tue, 7 Jan 2025 16:29:15 +0000 (10:29 -0600)
committerJunio C Hamano <gitster@pobox.com>
Tue, 7 Jan 2025 17:22:25 +0000 (09:22 -0800)
commitca7158076f9f6e0ee1c84595aaf44194a9880a72
tree38011f308bcc391b89010260c49a8bb7c7d7ba6d
parentbc2c65770dca70c1d4e151fad971bc7c7235a702
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>
builtin/receive-pack.c
fetch-pack.c
fsck.c
t/t5504-fetch-receive-strict.sh