]> git.ipfire.org Git - thirdparty/git.git/commit
reftable/stack: stop using `read_in_full()`
authorPatrick Steinhardt <ps@pks.im>
Tue, 18 Feb 2025 09:20:37 +0000 (10:20 +0100)
committerJunio C Hamano <gitster@pobox.com>
Tue, 18 Feb 2025 18:55:35 +0000 (10:55 -0800)
commitcb3e368b6913a2446f245e7ae7a7e4ae4a2e6794
treed24697360795ef0c10434535545b454d23ab1407
parent03944513488db4a81fdb4c21c3b515e4cb260b05
reftable/stack: stop using `read_in_full()`

There is a single callsite of `read_in_full()` in the reftable library.
Open-code the function to reduce our dependency on the Git library.

Note that we only partially port over the logic from `read_in_full()`
and its underlying `xread()` helper. Most importantly, the latter also
knows to handle `EWOULDBLOCK` via `handle_nonblock()`. This logic is
irrelevant for us though because the reftable library never sets the
`O_NONBLOCK` option in the first place.

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