mirror of
https://github.com/git/git.git
synced 2026-01-10 18:20:27 +00:00
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>
This commit is contained in:
committed by
Junio C Hamano
parent
bc2c65770d
commit
ca7158076f
@@ -1867,7 +1867,7 @@ int fetch_pack_fsck_config(const char *var, const char *value,
|
||||
char *path ;
|
||||
|
||||
if (git_config_pathname(&path, var, value))
|
||||
return 0;
|
||||
return -1;
|
||||
strbuf_addf(msg_types, "%cskiplist=%s",
|
||||
msg_types->len ? ',' : '=', path);
|
||||
free(path);
|
||||
|
||||
Reference in New Issue
Block a user