From: Junio C Hamano <gitster@pobox.com>
To: Justin Tobler <jltobler@gmail.com>
Cc: git@vger.kernel.org
Subject: Re: [PATCH] fsck: reject misconfigured fsck.skipList
Date: Tue, 07 Jan 2025 09:21:50 -0800 [thread overview]
Message-ID: <xmqqttaatu8h.fsf@gitster.g> (raw)
In-Reply-To: <20250107162914.3756968-2-jltobler@gmail.com> (Justin Tobler's message of "Tue, 7 Jan 2025 10:29:15 -0600")
Justin Tobler <jltobler@gmail.com> writes:
> 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.
If the value is missing, i.e.,
[fsck]
skipList
it is a very clear misconfiguration. "We expect a path, but you
gave me a valueless true". Once a specified value gets to
oidset_parse_file(), we would die when a specified path cannot be
opened, so it is not like we want to deliberately tolerate
misconfiguration (we also die if the value is given as "~t/sl" and
user "t" does not exist on the system).
Makes sense.
next prev parent reply other threads:[~2025-01-07 17:21 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-01-07 16:29 [PATCH] fsck: reject misconfigured fsck.skipList Justin Tobler
2025-01-07 17:21 ` Junio C Hamano [this message]
2025-01-09 8:00 ` Toon Claes
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=xmqqttaatu8h.fsf@gitster.g \
--to=gitster@pobox.com \
--cc=git@vger.kernel.org \
--cc=jltobler@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).