Subject: Re: [PATCH] reftable: honor core.fsync

From: Junio C Hamano <[email-masked]>
Date: Wed, 24 Jan 2024 09:22:48 -0800

Patrick Steinhardt <[email-masked]> writes:

>> The part about using NULL as the value to say "do not use any flusher"
>> still stands, though.  You do not have to expose noop_flush into the
>> global namespace that way.
>
> One benefit of explicitly using the `noop_flush()` function is that we
> make sure that all callsites that should provide a proper flushing
> function indeed do. A `noop_flush` in production code may raise some
> eyebrows, whereas a `NULL` value could easily be overlooked.

Very true.  Another benefit is that at runtime we do not need any
conditional deep inside the logic that calls the .flush method of
the writer object.