Re: [PATCH 04/18] Offer a function to demote fsck errors to warnings
- From
Johannes Schindelin <johannes.schindelin@gmx.de>
- Date
- Dec 23, 2014, 17:28 UTC
- Message-ID
- <alpine.DEB.1.00.1412231828050.21312@s15462909.onlinehome-server.info>
- In-Reply-To
- <xmqq61d24724.fsf@gitster.dls.corp.google.com>
Hi Junio,
On Tue, 23 Dec 2014, Junio C Hamano wrote:
Show 11 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). > > If you allocate a per-invocation fsck_options struct, then the > initialization the default with code is dead easy---you can just do > it immediately after you x[cm]alloc()---no?
There is no alloc. Right now, the initialization reads:
struct fsck_options options = strict ? FSCK_OPTIONS_STRICT : FSCK_OPTIONS_DEFAULT;
Ciao, Dscho