From: Patrick Steinhardt <ps@pks.im>
To: Junio C Hamano <gitster@pobox.com>
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:41:58 +0100 [thread overview]
Message-ID: <ZbDNVouHgr-J2ptC@tanuki> (raw)
In-Reply-To: <xmqqsf2nlnxv.fsf@gitster.g>
[-- Attachment #1: Type: text/plain, Size: 1237 bytes --]
On Tue, Jan 23, 2024 at 01:50:04PM -0800, Junio C Hamano wrote:
> Junio C Hamano <gitster@pobox.com> writes:
>
> > A comment and a half.
> >
> > * Can't the new "how to flush" go to the write-option structure?
> > If you represent "no flush" as a NULL pointer in the flush member,
> > most of the changes to the _test files can go, no?
>
> Nah, that was a stupid comment. These are used to populate the
> members of the reftable_writer instance being created, and it does
> make sense to have flush_func immediately next to writer_func.
Agreed (not on the "stupid" part, on having it next to `writer_func`).
> 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.
Whether that is a good enough reason for the additional churn might be a
different question. I don't think it's particularly bad though.
Patrick
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
next prev parent reply other threads:[~2024-01-24 8:42 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 [this message]
2024-01-24 17:22 ` Junio C Hamano
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=ZbDNVouHgr-J2ptC@tanuki \
--to=ps@pks.im \
--cc=git@vger.kernel.org \
--cc=gitgitgadget@gmail.com \
--cc=gitster@pobox.com \
--cc=johncai86@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).