]> git.ipfire.org Git - thirdparty/git.git/commitdiff
Merge branch 'ps/reftable-sans-compat-util'
authorJunio C Hamano <gitster@pobox.com>
Tue, 8 Apr 2025 18:43:14 +0000 (11:43 -0700)
committerJunio C Hamano <gitster@pobox.com>
Tue, 8 Apr 2025 18:43:14 +0000 (11:43 -0700)
Make the code in reftable library less reliant on the service
routines it used to borrow from Git proper, to make it easier to
use by external users of the library.

* ps/reftable-sans-compat-util:
  Makefile: skip reftable library for Coccinelle
  reftable: decouple from Git codebase by pulling in "compat/posix.h"
  git-compat-util.h: split out POSIX-emulating bits
  compat/mingw: split out POSIX-related bits
  reftable/basics: introduce `REFTABLE_UNUSED` annotation
  reftable/basics: stop using `SWAP()` macro
  reftable/stack: stop using `sleep_millisec()`
  reftable/system: introduce `reftable_rand()`
  reftable/reader: stop using `ARRAY_SIZE()` macro
  reftable/basics: provide wrappers for big endian conversion
  reftable/basics: stop using `st_mult()` in array allocators
  reftable: stop using `BUG()` in trivial cases
  reftable/record: don't `BUG()` in `reftable_record_cmp()`
  reftable/record: stop using `BUG()` in `reftable_record_init()`
  reftable/record: stop using `COPY_ARRAY()`
  reftable/blocksource: stop using `xmmap()`
  reftable/stack: stop using `write_in_full()`
  reftable/stack: stop using `read_in_full()`

1  2 
Makefile
git-compat-util.h
reftable/block.c
reftable/reader.c
reftable/record.c
reftable/writer.c

diff --cc Makefile
Simple merge
Simple merge
Simple merge
Simple merge
index d9fba8ff38857bea70790d18f5df9f6a44e3be2c,142853d5070fbec2cdf871e614474b5963df455d..c0080024ed773a17ae0334df33b04b464683ca98
@@@ -801,9 -812,9 +807,9 @@@ static int reftable_log_record_encode(c
        string_view_consume(&s, n);
  
        if (s.len < 2)
 -              return -1;
 +              return REFTABLE_ENTRY_TOO_BIG_ERROR;
  
-       put_be16(s.buf, r->value.update.tz_offset);
+       reftable_put_be16(s.buf, r->value.update.tz_offset);
        string_view_consume(&s, 2);
  
        n = encode_string(
Simple merge