[PATCH 0/6] reftable: some more portability improvements
- From
Patrick Steinhardt <ps@pks.im>
- Date
- Mar 31, 2026, 11:26 UTC
- Message-ID
- <20260331-pks-reftable-portability-fixes-v1-0-46bfae55c68c@pks.im>
Hi,
this patch series contains the last set of portability improvements that currently sits in the reftable implementation of libgit2. With these patches merged lbigit2 is able to fully reuse the reftable library while only having to provide its own system headers.
I've got a test run with libgit2 at [1], the code in Git is tested at [2]. Overall we're quite close -- the pull requests to implement the repository extension and to adjust handling of pseudo-refs have been merged. Still missing is a couple of test fixes, but once those are merged the reftable backend itself will be in review.
Thanks!
Patrick
[1]: https://github.com/libgit2/libgit2/pull/7117 [2]: https://gitlab.com/gitlab-org/git/-/merge_requests/535
---
Patrick Steinhardt (6):
reftable/system: provide `REFTABLE_INLINE()` macro
reftable/stack: don't call fsync(3p) unless provided
reftable/fsck: use REFTABLE_UNUSED instead of UNUSED
reftable/system: add abstraction to retrieve time in milliseconds
reftable/system: add abstraction to mmap files
reftable: introduce "reftable-system.h" headerreftable/basics.h | 20 ++++++++++---------- reftable/blocksource.c | 19 +++++++------------ reftable/fsck.c | 2 +- reftable/pq.h | 4 ++-- reftable/record.h | 4 ++-- reftable/reftable-basics.h | 2 +- reftable/reftable-block.h | 3 +-- reftable/reftable-blocksource.h | 2 +- reftable/reftable-error.h | 2 ++ reftable/reftable-fsck.h | 1 + reftable/reftable-iterator.h | 1 + reftable/reftable-merged.h | 1 + reftable/reftable-record.h | 2 +- reftable/reftable-stack.h | 1 + reftable/reftable-system.h | 7 +++++++ reftable/reftable-table.h | 1 + reftable/reftable-writer.h | 4 +--- reftable/stack.c | 29 +++++------------------------ reftable/system.c | 26 ++++++++++++++++++++++++++ reftable/system.h | 26 ++++++++++++++++++++++++-- 20 files changed, 96 insertions(+), 61 deletions(-)
--- base-commit: 270e10ad6dda3379ea0da7efd11e4fbf2cd7a325 change-id: 20260330-pks-reftable-portability-fixes-36ebf9f227c2