From: Patrick Steinhardt <ps@pks.im>
To: git@vger.kernel.org
Cc: Edward Thomson <ethomson@edwardthomson.com>,
Justin Tobler <jltobler@gmail.com>,
Junio C Hamano <gitster@pobox.com>, Johannes Sixt <j6t@kdbg.org>
Subject: [PATCH v4 09/18] reftable/basics: provide wrappers for big endian conversion
Date: Thu, 06 Feb 2025 08:52:11 +0100 [thread overview]
Message-ID: <20250206-pks-reftable-drop-git-compat-util-v4-9-603d276d5f95@pks.im> (raw)
In-Reply-To: <20250206-pks-reftable-drop-git-compat-util-v4-0-603d276d5f95@pks.im>
We're using a mixture of big endian conversion functions provided by
both the reftable library, but also by the Git codebase. Refactor the
code so that we exclusively use reftable-provided wrappers in order to
untangle us from the Git codebase.
Signed-off-by: Patrick Steinhardt <ps@pks.im>
---
reftable/basics.c | 19 ----------
reftable/basics.h | 76 ++++++++++++++++++++++++++++++++++++++--
reftable/block.c | 12 +++----
reftable/reader.c | 22 ++++++------
reftable/record.c | 8 ++---
reftable/writer.c | 20 +++++------
t/unit-tests/t-reftable-basics.c | 28 ++++++++++++---
7 files changed, 127 insertions(+), 58 deletions(-)
diff --git a/reftable/basics.c b/reftable/basics.c
index 3b5ea27bbd..8c4a4433e4 100644
--- a/reftable/basics.c
+++ b/reftable/basics.c
@@ -147,25 +147,6 @@ char *reftable_buf_detach(struct reftable_buf *buf)
return result;
}
-void put_be24(uint8_t *out, uint32_t i)
-{
- out[0] = (uint8_t)((i >> 16) & 0xff);
- out[1] = (uint8_t)((i >> 8) & 0xff);
- out[2] = (uint8_t)(i & 0xff);
-}
-
-uint32_t get_be24(uint8_t *in)
-{
- return (uint32_t)(in[0]) << 16 | (uint32_t)(in[1]) << 8 |
- (uint32_t)(in[2]);
-}
-
-void put_be16(uint8_t *out, uint16_t i)
-{
- out[0] = (uint8_t)((i >> 8) & 0xff);
- out[1] = (uint8_t)(i & 0xff);
-}
-
size_t binsearch(size_t sz, int (*f)(size_t k, void *args), void *args)
{
size_t lo = 0;
diff --git a/reftable/basics.h b/reftable/basics.h
index 646f8d67f2..c1ddbaec3f 100644
--- a/reftable/basics.h
+++ b/reftable/basics.h
@@ -76,9 +76,79 @@ char *reftable_buf_detach(struct reftable_buf *buf);
/* Bigendian en/decoding of integers */
-void put_be24(uint8_t *out, uint32_t i);
-uint32_t get_be24(uint8_t *in);
-void put_be16(uint8_t *out, uint16_t i);
+static inline void reftable_put_be16(void *out, uint16_t i)
+{
+ unsigned char *p = out;
+ p[0] = (uint8_t)((i >> 8) & 0xff);
+ p[1] = (uint8_t)((i >> 0) & 0xff);
+}
+
+static inline void reftable_put_be24(void *out, uint32_t i)
+{
+ unsigned char *p = out;
+ p[0] = (uint8_t)((i >> 16) & 0xff);
+ p[1] = (uint8_t)((i >> 8) & 0xff);
+ p[2] = (uint8_t)((i >> 0) & 0xff);
+}
+
+static inline void reftable_put_be32(void *out, uint32_t i)
+{
+ unsigned char *p = out;
+ p[0] = (uint8_t)((i >> 24) & 0xff);
+ p[1] = (uint8_t)((i >> 16) & 0xff);
+ p[2] = (uint8_t)((i >> 8) & 0xff);
+ p[3] = (uint8_t)((i >> 0) & 0xff);
+}
+
+static inline void reftable_put_be64(void *out, uint64_t i)
+{
+ unsigned char *p = out;
+ p[0] = (uint8_t)((i >> 56) & 0xff);
+ p[1] = (uint8_t)((i >> 48) & 0xff);
+ p[2] = (uint8_t)((i >> 40) & 0xff);
+ p[3] = (uint8_t)((i >> 32) & 0xff);
+ p[4] = (uint8_t)((i >> 24) & 0xff);
+ p[5] = (uint8_t)((i >> 16) & 0xff);
+ p[6] = (uint8_t)((i >> 8) & 0xff);
+ p[7] = (uint8_t)((i >> 0) & 0xff);
+}
+
+static inline uint16_t reftable_get_be16(const void *in)
+{
+ const unsigned char *p = in;
+ return (uint16_t)(p[0]) << 8 |
+ (uint16_t)(p[1]) << 0;
+}
+
+static inline uint32_t reftable_get_be24(const void *in)
+{
+ const unsigned char *p = in;
+ return (uint32_t)(p[0]) << 16 |
+ (uint32_t)(p[1]) << 8 |
+ (uint32_t)(p[2]) << 0;
+}
+
+static inline uint32_t reftable_get_be32(const void *in)
+{
+ const unsigned char *p = in;
+ return (uint32_t)(p[0]) << 24 |
+ (uint32_t)(p[1]) << 16 |
+ (uint32_t)(p[2]) << 8|
+ (uint32_t)(p[3]) << 0;
+}
+
+static inline uint64_t reftable_get_be64(const void *in)
+{
+ const unsigned char *p = in;
+ return (uint64_t)(p[0]) << 56 |
+ (uint64_t)(p[1]) << 48 |
+ (uint64_t)(p[2]) << 40 |
+ (uint64_t)(p[3]) << 32 |
+ (uint64_t)(p[4]) << 24 |
+ (uint64_t)(p[5]) << 16 |
+ (uint64_t)(p[6]) << 8 |
+ (uint64_t)(p[7]) << 0;
+}
/*
* find smallest index i in [0, sz) at which `f(i) > 0`, assuming that f is
diff --git a/reftable/block.c b/reftable/block.c
index 255d566854..373908807e 100644
--- a/reftable/block.c
+++ b/reftable/block.c
@@ -148,13 +148,13 @@ int block_writer_add(struct block_writer *w, struct reftable_record *rec)
int block_writer_finish(struct block_writer *w)
{
for (uint32_t i = 0; i < w->restart_len; i++) {
- put_be24(w->block + w->next, w->restarts[i]);
+ reftable_put_be24(w->block + w->next, w->restarts[i]);
w->next += 3;
}
- put_be16(w->block + w->next, w->restart_len);
+ reftable_put_be16(w->block + w->next, w->restart_len);
w->next += 2;
- put_be24(w->block + 1 + w->header_off, w->next);
+ reftable_put_be24(w->block + 1 + w->header_off, w->next);
/*
* Log records are stored zlib-compressed. Note that the compression
@@ -216,7 +216,7 @@ int block_reader_init(struct block_reader *br, struct reftable_block *block,
{
uint32_t full_block_size = table_block_size;
uint8_t typ = block->data[header_off];
- uint32_t sz = get_be24(block->data + header_off + 1);
+ uint32_t sz = reftable_get_be24(block->data + header_off + 1);
int err = 0;
uint16_t restart_count = 0;
uint32_t restart_start = 0;
@@ -300,7 +300,7 @@ int block_reader_init(struct block_reader *br, struct reftable_block *block,
full_block_size = sz;
}
- restart_count = get_be16(block->data + sz - 2);
+ restart_count = reftable_get_be16(block->data + sz - 2);
restart_start = sz - 2 - 3 * restart_count;
restart_bytes = block->data + restart_start;
@@ -355,7 +355,7 @@ int block_reader_first_key(const struct block_reader *br, struct reftable_buf *k
static uint32_t block_reader_restart_offset(const struct block_reader *br, size_t idx)
{
- return get_be24(br->restart_bytes + 3 * idx);
+ return reftable_get_be24(br->restart_bytes + 3 * idx);
}
void block_iter_seek_start(struct block_iter *it, const struct block_reader *br)
diff --git a/reftable/reader.c b/reftable/reader.c
index 36a5633ede..bf07a0a586 100644
--- a/reftable/reader.c
+++ b/reftable/reader.c
@@ -101,18 +101,18 @@ static int parse_footer(struct reftable_reader *r, uint8_t *footer,
}
f++;
- r->block_size = get_be24(f);
+ r->block_size = reftable_get_be24(f);
f += 3;
- r->min_update_index = get_be64(f);
+ r->min_update_index = reftable_get_be64(f);
f += 8;
- r->max_update_index = get_be64(f);
+ r->max_update_index = reftable_get_be64(f);
f += 8;
if (r->version == 1) {
r->hash_id = REFTABLE_HASH_SHA1;
} else {
- switch (get_be32(f)) {
+ switch (reftable_get_be32(f)) {
case REFTABLE_FORMAT_ID_SHA1:
r->hash_id = REFTABLE_HASH_SHA1;
break;
@@ -127,24 +127,24 @@ static int parse_footer(struct reftable_reader *r, uint8_t *footer,
f += 4;
}
- r->ref_offsets.index_offset = get_be64(f);
+ r->ref_offsets.index_offset = reftable_get_be64(f);
f += 8;
- r->obj_offsets.offset = get_be64(f);
+ r->obj_offsets.offset = reftable_get_be64(f);
f += 8;
r->object_id_len = r->obj_offsets.offset & ((1 << 5) - 1);
r->obj_offsets.offset >>= 5;
- r->obj_offsets.index_offset = get_be64(f);
+ r->obj_offsets.index_offset = reftable_get_be64(f);
f += 8;
- r->log_offsets.offset = get_be64(f);
+ r->log_offsets.offset = reftable_get_be64(f);
f += 8;
- r->log_offsets.index_offset = get_be64(f);
+ r->log_offsets.index_offset = reftable_get_be64(f);
f += 8;
computed_crc = crc32(0, footer, f - footer);
- file_crc = get_be32(f);
+ file_crc = reftable_get_be32(f);
f += 4;
if (computed_crc != file_crc) {
err = REFTABLE_FORMAT_ERROR;
@@ -214,7 +214,7 @@ static int32_t extract_block_size(uint8_t *data, uint8_t *typ, uint64_t off,
*typ = data[0];
if (reftable_is_block_type(*typ)) {
- result = get_be24(data + 1);
+ result = reftable_get_be24(data + 1);
}
return result;
}
diff --git a/reftable/record.c b/reftable/record.c
index b39d99fcc7..3552bafa99 100644
--- a/reftable/record.c
+++ b/reftable/record.c
@@ -689,7 +689,7 @@ static int reftable_log_record_key(const void *r, struct reftable_buf *dest)
return err;
ts = (~ts) - rec->update_index;
- put_be64(&i64[0], ts);
+ reftable_put_be64(&i64[0], ts);
err = reftable_buf_add(dest, i64, sizeof(i64));
if (err < 0)
@@ -814,7 +814,7 @@ static int reftable_log_record_encode(const void *rec, struct string_view s,
if (s.len < 2)
return -1;
- 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(
@@ -846,7 +846,7 @@ static int reftable_log_record_decode(void *rec, struct reftable_buf key,
}
memcpy(r->refname, key.buf, key.len - 8);
- ts = get_be64(key.buf + key.len - 8);
+ ts = reftable_get_be64((unsigned char *)key.buf + key.len - 8);
r->update_index = (~max) - ts;
@@ -937,7 +937,7 @@ static int reftable_log_record_decode(void *rec, struct reftable_buf key,
goto done;
}
- r->value.update.tz_offset = get_be16(in.buf);
+ r->value.update.tz_offset = reftable_get_be16(in.buf);
string_view_consume(&in, 2);
n = decode_string(scratch, in);
diff --git a/reftable/writer.c b/reftable/writer.c
index 155863ee5f..5961698311 100644
--- a/reftable/writer.c
+++ b/reftable/writer.c
@@ -99,9 +99,9 @@ static int writer_write_header(struct reftable_writer *w, uint8_t *dest)
dest[4] = writer_version(w);
- put_be24(dest + 5, w->opts.block_size);
- put_be64(dest + 8, w->min_update_index);
- put_be64(dest + 16, w->max_update_index);
+ reftable_put_be24(dest + 5, w->opts.block_size);
+ reftable_put_be64(dest + 8, w->min_update_index);
+ reftable_put_be64(dest + 16, w->max_update_index);
if (writer_version(w) == 2) {
uint32_t hash_id;
@@ -116,7 +116,7 @@ static int writer_write_header(struct reftable_writer *w, uint8_t *dest)
return -1;
}
- put_be32(dest + 24, hash_id);
+ reftable_put_be32(dest + 24, hash_id);
}
return header_size(writer_version(w));
@@ -717,19 +717,19 @@ int reftable_writer_close(struct reftable_writer *w)
}
p += writer_write_header(w, footer);
- put_be64(p, w->stats.ref_stats.index_offset);
+ reftable_put_be64(p, w->stats.ref_stats.index_offset);
p += 8;
- put_be64(p, (w->stats.obj_stats.offset) << 5 | w->stats.object_id_len);
+ reftable_put_be64(p, (w->stats.obj_stats.offset) << 5 | w->stats.object_id_len);
p += 8;
- put_be64(p, w->stats.obj_stats.index_offset);
+ reftable_put_be64(p, w->stats.obj_stats.index_offset);
p += 8;
- put_be64(p, w->stats.log_stats.offset);
+ reftable_put_be64(p, w->stats.log_stats.offset);
p += 8;
- put_be64(p, w->stats.log_stats.index_offset);
+ reftable_put_be64(p, w->stats.log_stats.index_offset);
p += 8;
- put_be32(p, crc32(0, footer, p - footer));
+ reftable_put_be32(p, crc32(0, footer, p - footer));
p += 4;
err = w->flush(w->write_arg);
diff --git a/t/unit-tests/t-reftable-basics.c b/t/unit-tests/t-reftable-basics.c
index 9ba7eb05ad..c9e751e49e 100644
--- a/t/unit-tests/t-reftable-basics.c
+++ b/t/unit-tests/t-reftable-basics.c
@@ -128,12 +128,30 @@ int cmd_main(int argc UNUSED, const char *argv[] UNUSED)
reftable_buf_release(&b);
}
- if_test ("put_be24 and get_be24 work") {
+ if_test ("reftable_put_be64 and reftable_get_be64 work") {
+ uint64_t in = 0x1122334455667788;
+ uint8_t dest[8];
+ uint64_t out;
+ reftable_put_be64(dest, in);
+ out = reftable_get_be64(dest);
+ check_int(in, ==, out);
+ }
+
+ if_test ("reftable_put_be32 and reftable_get_be32 work") {
+ uint32_t in = 0x11223344;
+ uint8_t dest[4];
+ uint32_t out;
+ reftable_put_be32(dest, in);
+ out = reftable_get_be32(dest);
+ check_int(in, ==, out);
+ }
+
+ if_test ("reftable_put_be24 and reftable_get_be24 work") {
uint32_t in = 0x112233;
uint8_t dest[3];
uint32_t out;
- put_be24(dest, in);
- out = get_be24(dest);
+ reftable_put_be24(dest, in);
+ out = reftable_get_be24(dest);
check_int(in, ==, out);
}
@@ -141,8 +159,8 @@ int cmd_main(int argc UNUSED, const char *argv[] UNUSED)
uint32_t in = 0xfef1;
uint8_t dest[3];
uint32_t out;
- put_be16(dest, in);
- out = get_be16(dest);
+ reftable_put_be16(dest, in);
+ out = reftable_get_be16(dest);
check_int(in, ==, out);
}
--
2.48.1.538.gc4cfc42d60.dirty
next prev parent reply other threads:[~2025-02-06 7:52 UTC|newest]
Thread overview: 146+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-01-27 13:04 [PATCH 00/19] reftable: stop using "git-compat-util.h" Patrick Steinhardt
2025-01-27 13:04 ` [PATCH 01/19] reftable/stack: stop using `read_in_full()` Patrick Steinhardt
2025-01-27 16:57 ` Justin Tobler
2025-01-28 8:06 ` Patrick Steinhardt
2025-01-28 17:05 ` Junio C Hamano
2025-01-29 7:29 ` Patrick Steinhardt
2025-01-27 13:04 ` [PATCH 02/19] reftable/stack: stop using `write_in_full()` Patrick Steinhardt
2025-01-27 13:04 ` [PATCH 03/19] reftable/blocksource: stop using `xmmap()` Patrick Steinhardt
2025-01-27 13:04 ` [PATCH 04/19] reftable/record: stop using `COPY_ARRAY()` Patrick Steinhardt
2025-01-27 13:04 ` [PATCH 05/19] reftable/record: stop using `BUG()` in `reftable_record_init()` Patrick Steinhardt
2025-01-27 17:36 ` Justin Tobler
2025-01-27 13:04 ` [PATCH 06/19] reftable/record: don't `BUG()` in `reftable_record_cmp()` Patrick Steinhardt
2025-01-27 19:21 ` Justin Tobler
2025-01-27 13:04 ` [PATCH 07/19] reftable: stop using `BUG()` in trivial cases Patrick Steinhardt
2025-01-27 13:04 ` [PATCH 08/19] reftable/basics: stop using `st_mult()` in array allocators Patrick Steinhardt
2025-01-27 13:04 ` [PATCH 09/19] reftable/basics: provide wrappers for big endian conversion Patrick Steinhardt
2025-01-27 13:04 ` [PATCH 10/19] reftable/reader: stop using `ARRAY_SIZE()` macro Patrick Steinhardt
2025-01-27 13:04 ` [PATCH 11/19] reftable/system: introduce `reftable_rand()` Patrick Steinhardt
2025-01-27 13:04 ` [PATCH 12/19] reftable/stack: stop using `sleep_millisec()` Patrick Steinhardt
2025-01-27 13:04 ` [PATCH 13/19] reftable/basics: stop using `SWAP()` macro Patrick Steinhardt
2025-01-27 13:04 ` [PATCH 14/19] reftable/basics: stop using `UNUSED` annotation Patrick Steinhardt
2025-01-27 13:04 ` [PATCH 15/19] compat/mingw: split out POSIX-related bits Patrick Steinhardt
2025-01-27 13:04 ` [PATCH 16/19] compat/msvc: " Patrick Steinhardt
2025-01-27 13:04 ` [PATCH 17/19] git-compat-util.h: split out POSIX-emulating bits Patrick Steinhardt
2025-01-27 19:25 ` Justin Tobler
2025-01-27 13:04 ` [PATCH 18/19] reftable: decouple from Git codebase by pulling in "compat/posix.h" Patrick Steinhardt
2025-01-27 13:04 ` [PATCH 19/19] Makefile: skip reftable library for Coccinelle Patrick Steinhardt
2025-01-27 17:44 ` [PATCH 00/19] reftable: stop using "git-compat-util.h" Junio C Hamano
2025-01-28 8:22 ` Patrick Steinhardt
2025-01-28 17:32 ` Junio C Hamano
2025-01-28 8:28 ` [PATCH v2 00/20] " Patrick Steinhardt
2025-01-28 8:28 ` [PATCH v2 01/20] reftable/stack: stop using `read_in_full()` Patrick Steinhardt
2025-01-28 8:28 ` [PATCH v2 02/20] reftable/stack: stop using `write_in_full()` Patrick Steinhardt
2025-01-28 8:28 ` [PATCH v2 03/20] reftable/blocksource: stop using `xmmap()` Patrick Steinhardt
2025-01-28 8:28 ` [PATCH v2 04/20] reftable/record: stop using `COPY_ARRAY()` Patrick Steinhardt
2025-01-29 15:46 ` Justin Tobler
2025-02-03 8:40 ` Patrick Steinhardt
2025-01-28 8:28 ` [PATCH v2 05/20] reftable/record: stop using `BUG()` in `reftable_record_init()` Patrick Steinhardt
2025-01-28 8:28 ` [PATCH v2 06/20] reftable/record: don't `BUG()` in `reftable_record_cmp()` Patrick Steinhardt
2025-01-28 8:28 ` [PATCH v2 07/20] reftable: stop using `BUG()` in trivial cases Patrick Steinhardt
2025-01-28 8:28 ` [PATCH v2 08/20] reftable/basics: stop using `st_mult()` in array allocators Patrick Steinhardt
2025-01-28 8:28 ` [PATCH v2 09/20] reftable/basics: provide wrappers for big endian conversion Patrick Steinhardt
2025-01-28 8:28 ` [PATCH v2 10/20] reftable/reader: stop using `ARRAY_SIZE()` macro Patrick Steinhardt
2025-01-28 8:28 ` [PATCH v2 11/20] reftable/system: introduce `reftable_rand()` Patrick Steinhardt
2025-01-28 8:28 ` [PATCH v2 12/20] reftable/stack: stop using `sleep_millisec()` Patrick Steinhardt
2025-01-28 8:28 ` [PATCH v2 13/20] reftable/basics: stop using `SWAP()` macro Patrick Steinhardt
2025-01-28 8:28 ` [PATCH v2 14/20] reftable/basics: stop using `UNUSED` annotation Patrick Steinhardt
2025-01-28 8:28 ` [PATCH v2 15/20] compat: consistently resolve headers via project root Patrick Steinhardt
2025-01-29 7:50 ` Johannes Sixt
2025-01-29 14:23 ` Junio C Hamano
2025-02-03 8:40 ` Patrick Steinhardt
2025-01-28 8:28 ` [PATCH v2 16/20] compat/mingw: split out POSIX-related bits Patrick Steinhardt
2025-01-28 8:28 ` [PATCH v2 17/20] compat/msvc: " Patrick Steinhardt
2025-01-28 8:28 ` [PATCH v2 18/20] git-compat-util.h: split out POSIX-emulating bits Patrick Steinhardt
2025-01-28 8:28 ` [PATCH v2 19/20] reftable: decouple from Git codebase by pulling in "compat/posix.h" Patrick Steinhardt
2025-01-28 8:28 ` [PATCH v2 20/20] Makefile: skip reftable library for Coccinelle Patrick Steinhardt
2025-01-28 22:48 ` [PATCH v2 00/20] reftable: stop using "git-compat-util.h" Junio C Hamano
2025-01-29 7:25 ` Patrick Steinhardt
2025-01-29 13:50 ` Junio C Hamano
2025-02-03 8:03 ` [PATCH v3 00/18] " Patrick Steinhardt
2025-02-03 8:03 ` [PATCH v3 01/18] reftable/stack: stop using `read_in_full()` Patrick Steinhardt
2025-02-03 8:03 ` [PATCH v3 02/18] reftable/stack: stop using `write_in_full()` Patrick Steinhardt
2025-02-03 8:03 ` [PATCH v3 03/18] reftable/blocksource: stop using `xmmap()` Patrick Steinhardt
2025-02-03 8:03 ` [PATCH v3 04/18] reftable/record: stop using `COPY_ARRAY()` Patrick Steinhardt
2025-02-03 8:03 ` [PATCH v3 05/18] reftable/record: stop using `BUG()` in `reftable_record_init()` Patrick Steinhardt
2025-02-03 8:03 ` [PATCH v3 06/18] reftable/record: don't `BUG()` in `reftable_record_cmp()` Patrick Steinhardt
2025-02-03 8:03 ` [PATCH v3 07/18] reftable: stop using `BUG()` in trivial cases Patrick Steinhardt
2025-02-03 8:03 ` [PATCH v3 08/18] reftable/basics: stop using `st_mult()` in array allocators Patrick Steinhardt
2025-02-03 8:03 ` [PATCH v3 09/18] reftable/basics: provide wrappers for big endian conversion Patrick Steinhardt
2025-02-03 8:03 ` [PATCH v3 10/18] reftable/reader: stop using `ARRAY_SIZE()` macro Patrick Steinhardt
2025-02-03 8:03 ` [PATCH v3 11/18] reftable/system: introduce `reftable_rand()` Patrick Steinhardt
2025-02-03 8:03 ` [PATCH v3 12/18] reftable/stack: stop using `sleep_millisec()` Patrick Steinhardt
2025-02-03 8:03 ` [PATCH v3 13/18] reftable/basics: stop using `SWAP()` macro Patrick Steinhardt
2025-02-03 8:03 ` [PATCH v3 14/18] reftable/basics: stop using `UNUSED` annotation Patrick Steinhardt
2025-02-03 8:03 ` [PATCH v3 15/18] compat/mingw: split out POSIX-related bits Patrick Steinhardt
2025-02-03 8:03 ` [PATCH v3 16/18] git-compat-util.h: split out POSIX-emulating bits Patrick Steinhardt
2025-02-03 8:03 ` [PATCH v3 17/18] reftable: decouple from Git codebase by pulling in "compat/posix.h" Patrick Steinhardt
2025-02-03 8:03 ` [PATCH v3 18/18] Makefile: skip reftable library for Coccinelle Patrick Steinhardt
2025-02-06 4:04 ` [PATCH v3 00/18] reftable: stop using "git-compat-util.h" Justin Tobler
2025-02-06 7:52 ` [PATCH v4 " Patrick Steinhardt
2025-02-06 7:52 ` [PATCH v4 01/18] reftable/stack: stop using `read_in_full()` Patrick Steinhardt
2025-02-06 7:52 ` [PATCH v4 02/18] reftable/stack: stop using `write_in_full()` Patrick Steinhardt
2025-02-06 7:52 ` [PATCH v4 03/18] reftable/blocksource: stop using `xmmap()` Patrick Steinhardt
2025-02-06 7:52 ` [PATCH v4 04/18] reftable/record: stop using `COPY_ARRAY()` Patrick Steinhardt
2025-02-06 7:52 ` [PATCH v4 05/18] reftable/record: stop using `BUG()` in `reftable_record_init()` Patrick Steinhardt
2025-02-06 7:52 ` [PATCH v4 06/18] reftable/record: don't `BUG()` in `reftable_record_cmp()` Patrick Steinhardt
2025-02-06 7:52 ` [PATCH v4 07/18] reftable: stop using `BUG()` in trivial cases Patrick Steinhardt
2025-02-06 7:52 ` [PATCH v4 08/18] reftable/basics: stop using `st_mult()` in array allocators Patrick Steinhardt
2025-02-06 7:52 ` Patrick Steinhardt [this message]
2025-02-06 7:52 ` [PATCH v4 10/18] reftable/reader: stop using `ARRAY_SIZE()` macro Patrick Steinhardt
2025-02-06 7:52 ` [PATCH v4 11/18] reftable/system: introduce `reftable_rand()` Patrick Steinhardt
2025-02-06 7:52 ` [PATCH v4 12/18] reftable/stack: stop using `sleep_millisec()` Patrick Steinhardt
2025-02-06 7:52 ` [PATCH v4 13/18] reftable/basics: stop using `SWAP()` macro Patrick Steinhardt
2025-02-06 7:52 ` [PATCH v4 14/18] reftable/basics: stop using `UNUSED` annotation Patrick Steinhardt
2025-02-07 10:03 ` Toon Claes
2025-02-07 11:50 ` Patrick Steinhardt
2025-02-06 7:52 ` [PATCH v4 15/18] compat/mingw: split out POSIX-related bits Patrick Steinhardt
2025-02-06 7:52 ` [PATCH v4 16/18] git-compat-util.h: split out POSIX-emulating bits Patrick Steinhardt
2025-02-06 7:52 ` [PATCH v4 17/18] reftable: decouple from Git codebase by pulling in "compat/posix.h" Patrick Steinhardt
2025-02-06 7:52 ` [PATCH v4 18/18] Makefile: skip reftable library for Coccinelle Patrick Steinhardt
2025-02-07 11:51 ` [PATCH v5 00/18] reftable: stop using "git-compat-util.h" Patrick Steinhardt
2025-02-07 11:51 ` [PATCH v5 01/18] reftable/stack: stop using `read_in_full()` Patrick Steinhardt
2025-02-07 11:51 ` [PATCH v5 02/18] reftable/stack: stop using `write_in_full()` Patrick Steinhardt
2025-02-07 11:51 ` [PATCH v5 03/18] reftable/blocksource: stop using `xmmap()` Patrick Steinhardt
2025-02-07 11:51 ` [PATCH v5 04/18] reftable/record: stop using `COPY_ARRAY()` Patrick Steinhardt
2025-02-07 11:52 ` [PATCH v5 05/18] reftable/record: stop using `BUG()` in `reftable_record_init()` Patrick Steinhardt
2025-02-07 11:52 ` [PATCH v5 06/18] reftable/record: don't `BUG()` in `reftable_record_cmp()` Patrick Steinhardt
2025-02-07 11:52 ` [PATCH v5 07/18] reftable: stop using `BUG()` in trivial cases Patrick Steinhardt
2025-02-07 11:52 ` [PATCH v5 08/18] reftable/basics: stop using `st_mult()` in array allocators Patrick Steinhardt
2025-02-07 11:52 ` [PATCH v5 09/18] reftable/basics: provide wrappers for big endian conversion Patrick Steinhardt
2025-02-07 11:52 ` [PATCH v5 10/18] reftable/reader: stop using `ARRAY_SIZE()` macro Patrick Steinhardt
2025-02-07 11:52 ` [PATCH v5 11/18] reftable/system: introduce `reftable_rand()` Patrick Steinhardt
2025-02-07 11:52 ` [PATCH v5 12/18] reftable/stack: stop using `sleep_millisec()` Patrick Steinhardt
2025-02-07 11:52 ` [PATCH v5 13/18] reftable/basics: stop using `SWAP()` macro Patrick Steinhardt
2025-02-07 11:52 ` [PATCH v5 14/18] reftable/basics: introduce `REFTABLE_UNUSED` annotation Patrick Steinhardt
2025-02-07 11:52 ` [PATCH v5 15/18] compat/mingw: split out POSIX-related bits Patrick Steinhardt
2025-02-09 13:14 ` Johannes Sixt
2025-02-10 15:50 ` Junio C Hamano
2025-02-13 18:22 ` Johannes Schindelin
2025-02-17 12:47 ` Patrick Steinhardt
2025-02-07 11:52 ` [PATCH v5 16/18] git-compat-util.h: split out POSIX-emulating bits Patrick Steinhardt
2025-02-07 11:52 ` [PATCH v5 17/18] reftable: decouple from Git codebase by pulling in "compat/posix.h" Patrick Steinhardt
2025-02-07 11:52 ` [PATCH v5 18/18] Makefile: skip reftable library for Coccinelle Patrick Steinhardt
2025-02-18 9:20 ` [PATCH v6 00/18] reftable: stop using "git-compat-util.h" Patrick Steinhardt
2025-02-18 9:20 ` [PATCH v6 01/18] reftable/stack: stop using `read_in_full()` Patrick Steinhardt
2025-02-18 9:20 ` [PATCH v6 02/18] reftable/stack: stop using `write_in_full()` Patrick Steinhardt
2025-02-18 9:20 ` [PATCH v6 03/18] reftable/blocksource: stop using `xmmap()` Patrick Steinhardt
2025-02-18 9:20 ` [PATCH v6 04/18] reftable/record: stop using `COPY_ARRAY()` Patrick Steinhardt
2025-02-18 9:20 ` [PATCH v6 05/18] reftable/record: stop using `BUG()` in `reftable_record_init()` Patrick Steinhardt
2025-02-18 9:20 ` [PATCH v6 06/18] reftable/record: don't `BUG()` in `reftable_record_cmp()` Patrick Steinhardt
2025-02-18 9:20 ` [PATCH v6 07/18] reftable: stop using `BUG()` in trivial cases Patrick Steinhardt
2025-02-18 9:20 ` [PATCH v6 08/18] reftable/basics: stop using `st_mult()` in array allocators Patrick Steinhardt
2025-02-18 9:20 ` [PATCH v6 09/18] reftable/basics: provide wrappers for big endian conversion Patrick Steinhardt
2025-02-18 9:20 ` [PATCH v6 10/18] reftable/reader: stop using `ARRAY_SIZE()` macro Patrick Steinhardt
2025-02-18 9:20 ` [PATCH v6 11/18] reftable/system: introduce `reftable_rand()` Patrick Steinhardt
2025-02-18 9:20 ` [PATCH v6 12/18] reftable/stack: stop using `sleep_millisec()` Patrick Steinhardt
2025-02-18 9:20 ` [PATCH v6 13/18] reftable/basics: stop using `SWAP()` macro Patrick Steinhardt
2025-02-18 9:20 ` [PATCH v6 14/18] reftable/basics: introduce `REFTABLE_UNUSED` annotation Patrick Steinhardt
2025-02-18 9:20 ` [PATCH v6 15/18] compat/mingw: split out POSIX-related bits Patrick Steinhardt
2025-02-18 9:20 ` [PATCH v6 16/18] git-compat-util.h: split out POSIX-emulating bits Patrick Steinhardt
2025-02-18 9:20 ` [PATCH v6 17/18] reftable: decouple from Git codebase by pulling in "compat/posix.h" Patrick Steinhardt
2025-02-18 9:20 ` [PATCH v6 18/18] Makefile: skip reftable library for Coccinelle Patrick Steinhardt
2025-02-18 18:55 ` [PATCH v6 00/18] reftable: stop using "git-compat-util.h" Junio C Hamano
2025-03-11 23:29 ` Junio C Hamano
2025-03-12 6:51 ` Patrick Steinhardt
2025-03-20 15:17 ` Patrick Steinhardt
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250206-pks-reftable-drop-git-compat-util-v4-9-603d276d5f95@pks.im \
--to=ps@pks.im \
--cc=ethomson@edwardthomson.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=j6t@kdbg.org \
--cc=jltobler@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).