Re: [PATCH 04/18] Offer a function to demote fsck errors to warnings
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Dec 23, 2014, 18:14 UTC
- Message-ID
- <CAPc5daWBL89KpYqONNyvJ-t8K1P-nMJVAU1bLWkqzHGdb2q-gA@mail.gmail.com>
- In-Reply-To
- <alpine.DEB.1.00.1412231828050.21312@s15462909.onlinehome-server.info>
On Tue, Dec 23, 2014 at 9:28 AM, Johannes Schindelin <Johannes.Schindelin@gmx.de> wrote:
Show 12 quoted lines
>> Johannes Schindelin <Johannes.Schindelin@gmx.de> writes: >> >> > And *still*, this is *just* a global table with defaults. I would *still* >> > need to copy-on-write when the first customization of the severity level >> > takes place because I cannot allow the global defaults to be modified by >> > one caller (that would defeat the whole purpose of having per-caller >> > settings bundled in the fsck_options struct). > > There is no alloc. Right now, the initialization reads: > > struct fsck_options options = strict ? > FSCK_OPTIONS_STRICT : FSCK_OPTIONS_DEFAULT;
Then it is just the matter of having
fsck_options_init(&options);
if (strict)
options.some_field = make_it_strict;as the first few statements, no?
I am not sure why it is so difficult....