]> git.ipfire.org Git - thirdparty/git.git/commit
git-compat-util.h: split out POSIX-emulating bits
authorPatrick Steinhardt <ps@pks.im>
Tue, 18 Feb 2025 09:20:52 +0000 (10:20 +0100)
committerJunio C Hamano <gitster@pobox.com>
Tue, 18 Feb 2025 18:55:40 +0000 (10:55 -0800)
commit75a044f748f2c37a2a08854acd49ed1fbdb86bb1
treed62489045043ffc9d65f44d5d65d655d22f1f0c2
parent0b960a53daa1b336bcec5810f70d8af8ced86ca8
git-compat-util.h: split out POSIX-emulating bits

The "git-compat-util.h" header is a treasure trove of various bits and
pieces used throughout the project. It basically mixes two different
things into one:

  - Providing a POSIX-like interface even on platforms that aren't
    POSIX-compliant.

  - Providing low-level functionality that is specific to Git.

This intermixing is a bit of a problem for the reftable library as we
don't want to recreate the POSIX-like interface there. But neither do we
want to pull in the Git-specific functionality, as it is otherwise quite
easy to start depending on the Git codebase again.

Split out a new header "compat/posix.h" that only contains the bits and
pieces relevant for the emulation of POSIX, which we will start using in
the next commit.

Signed-off-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
compat/posix.h [new file with mode: 0644]
git-compat-util.h