From: Junio C Hamano <gitster@pobox.com>
To: Patrick Steinhardt <ps@pks.im>
Cc: John Cai via GitGitGadget <gitgitgadget@gmail.com>,
git@vger.kernel.org, John Cai <johncai86@gmail.com>
Subject: Re: [PATCH] reftable: honor core.fsync
Date: Wed, 24 Jan 2024 09:22:48 -0800 [thread overview]
Message-ID: <xmqq4jf2hcif.fsf@gitster.g> (raw)
In-Reply-To: <ZbDNVouHgr-J2ptC@tanuki> (Patrick Steinhardt's message of "Wed, 24 Jan 2024 09:41:58 +0100")
Patrick Steinhardt <ps@pks.im> 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.
next prev parent reply other threads:[~2024-01-24 17:22 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-23 18:51 [PATCH] reftable: honor core.fsync John Cai via GitGitGadget
2024-01-23 19:31 ` Junio C Hamano
2024-01-23 21:42 ` John Cai
2024-01-23 21:50 ` Junio C Hamano
2024-01-24 8:41 ` Patrick Steinhardt
2024-01-24 17:22 ` Junio C Hamano [this message]
2024-01-23 21:06 ` Kristoffer Haugsbakk
2024-01-23 21:38 ` John Cai
2024-01-29 9:48 ` Patrick Steinhardt
2024-01-29 17:15 ` Junio C Hamano
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=xmqq4jf2hcif.fsf@gitster.g \
--to=gitster@pobox.com \
--cc=git@vger.kernel.org \
--cc=gitgitgadget@gmail.com \
--cc=johncai86@gmail.com \
--cc=ps@pks.im \
/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).