]> git.ipfire.org Git - thirdparty/git.git/commit
reftable: decouple from Git codebase by pulling in "compat/posix.h"
authorPatrick Steinhardt <ps@pks.im>
Tue, 18 Feb 2025 09:20:53 +0000 (10:20 +0100)
committerJunio C Hamano <gitster@pobox.com>
Tue, 18 Feb 2025 18:55:41 +0000 (10:55 -0800)
commit6af23ac66cc5050aa4aa2adb5037196536c824e3
tree1c52d3fb579a8f25f99ffd6f51b8166f426c1306
parent75a044f748f2c37a2a08854acd49ed1fbdb86bb1
reftable: decouple from Git codebase by pulling in "compat/posix.h"

The reftable library includes "git-compat-util.h" in order to get a
POSIX-like programming environment that papers over various differences
between platforms. The header also brings with it a couple of helpers
specific to the Git codebase though, and over time we have started to
use these helpers in the reftable library, as well.

This makes it very hard to use the reftable library as a standalone
library without the rest of the Git codebase, so other libraries like
e.g. libgit2 cannot easily use it. But now that we have removed all
calls to Git-specific functionality and have split out "compat/posix.h"
as a separate header we can address this.

Stop including "git-compat-util.h" and instead include "compat/posix.h"
to finalize the decoupling of the reftable library from the rest of the
Git codebase. The only bits which remain specific to Git are "system.h"
and "system.c", which projects will have to provide.

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