]> git.ipfire.org Git - thirdparty/git.git/commit
reftable/stack: stop using `fsync_component()` directly
authorPatrick Steinhardt <ps@pks.im>
Mon, 18 Nov 2024 15:34:00 +0000 (16:34 +0100)
committerJunio C Hamano <gitster@pobox.com>
Tue, 19 Nov 2024 03:23:10 +0000 (12:23 +0900)
commit86b770b0bbf1aba3c8e43401936258c58648703a
tree97ca3a09de568434e512931d018d332d7ae61489
parentc2f08236ed786a48e50af33ecc5c0f951c14761b
reftable/stack: stop using `fsync_component()` directly

We're executing `fsync_component()` directly in the reftable library so
that we can fsync data to disk depending on "core.fsync". But as we're
in the process of converting the reftable library to become standalone
we cannot use that function in the library anymore.

Refactor the code such that users of the library can inject a custom
fsync function via the write options. This allows us to get rid of the
dependency on "write-or-die.h".

Signed-off-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
refs/reftable-backend.c
reftable/reftable-writer.h
reftable/stack.c