git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
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>,
	 Johannes Schindelin <Johannes.Schindelin@gmx.de>
Subject: [PATCH v6 06/18] reftable/record: don't `BUG()` in `reftable_record_cmp()`
Date: Tue, 18 Feb 2025 10:20:42 +0100	[thread overview]
Message-ID: <20250218-pks-reftable-drop-git-compat-util-v6-6-8c1f39fb4c02@pks.im> (raw)
In-Reply-To: <20250218-pks-reftable-drop-git-compat-util-v6-0-8c1f39fb4c02@pks.im>

The reftable library aborts with a bug in case `reftable_record_cmp()`
is invoked with two records of differing types. This would cause the
program to die without the caller being able to handle the error, which
is not something we want in the context of library code. And it ties us
to the Git codebase.

Refactor the code such that `reftable_record_cmp()` returns an error
code separate from the actual comparison result. This requires us to
also adapt some callers up the callchain in a similar fashion.

Signed-off-by: Patrick Steinhardt <ps@pks.im>
---
 reftable/merged.c                | 20 +++++++++++++++-----
 reftable/pq.c                    | 36 +++++++++++++++++++++++++++++-------
 reftable/pq.h                    |  2 +-
 reftable/record.c                | 10 ++++++----
 reftable/record.h                |  2 +-
 t/unit-tests/t-reftable-pq.c     | 16 ++++++++++++----
 t/unit-tests/t-reftable-record.c | 40 ++++++++++++++++++++++++++++------------
 7 files changed, 92 insertions(+), 34 deletions(-)

diff --git a/reftable/merged.c b/reftable/merged.c
index 4156eec07fc..563864068c1 100644
--- a/reftable/merged.c
+++ b/reftable/merged.c
@@ -66,8 +66,11 @@ static int merged_iter_seek(struct merged_iter *mi, struct reftable_record *want
 	int err;
 
 	mi->advance_index = -1;
-	while (!merged_iter_pqueue_is_empty(mi->pq))
-		merged_iter_pqueue_remove(&mi->pq);
+	while (!merged_iter_pqueue_is_empty(mi->pq)) {
+		err = merged_iter_pqueue_remove(&mi->pq, NULL);
+		if (err < 0)
+			return err;
+	}
 
 	for (size_t i = 0; i < mi->subiters_len; i++) {
 		err = iterator_seek(&mi->subiters[i].iter, want);
@@ -120,7 +123,9 @@ static int merged_iter_next_entry(struct merged_iter *mi,
 	if (empty)
 		return 1;
 
-	entry = merged_iter_pqueue_remove(&mi->pq);
+	err = merged_iter_pqueue_remove(&mi->pq, &entry);
+	if (err < 0)
+		return err;
 
 	/*
 	  One can also use reftable as datacenter-local storage, where the ref
@@ -134,11 +139,16 @@ static int merged_iter_next_entry(struct merged_iter *mi,
 		struct pq_entry top = merged_iter_pqueue_top(mi->pq);
 		int cmp;
 
-		cmp = reftable_record_cmp(top.rec, entry.rec);
+		err = reftable_record_cmp(top.rec, entry.rec, &cmp);
+		if (err < 0)
+			return err;
 		if (cmp > 0)
 			break;
 
-		merged_iter_pqueue_remove(&mi->pq);
+		err = merged_iter_pqueue_remove(&mi->pq, NULL);
+		if (err < 0)
+			return err;
+
 		err = merged_iter_advance_subiter(mi, top.index);
 		if (err < 0)
 			return err;
diff --git a/reftable/pq.c b/reftable/pq.c
index 5591e875e1e..ef8035cfd9b 100644
--- a/reftable/pq.c
+++ b/reftable/pq.c
@@ -15,13 +15,18 @@ license that can be found in the LICENSE file or at
 
 int pq_less(struct pq_entry *a, struct pq_entry *b)
 {
-	int cmp = reftable_record_cmp(a->rec, b->rec);
+	int cmp, err;
+
+	err = reftable_record_cmp(a->rec, b->rec, &cmp);
+	if (err < 0)
+		return err;
+
 	if (cmp == 0)
 		return a->index > b->index;
 	return cmp < 0;
 }
 
-struct pq_entry merged_iter_pqueue_remove(struct merged_iter_pqueue *pq)
+int merged_iter_pqueue_remove(struct merged_iter_pqueue *pq, struct pq_entry *out)
 {
 	size_t i = 0;
 	struct pq_entry e = pq->heap[0];
@@ -32,17 +37,34 @@ struct pq_entry merged_iter_pqueue_remove(struct merged_iter_pqueue *pq)
 		size_t min = i;
 		size_t j = 2 * i + 1;
 		size_t k = 2 * i + 2;
-		if (j < pq->len && pq_less(&pq->heap[j], &pq->heap[i]))
-			min = j;
-		if (k < pq->len && pq_less(&pq->heap[k], &pq->heap[min]))
-			min = k;
+		int cmp;
+
+		if (j < pq->len) {
+			cmp = pq_less(&pq->heap[j], &pq->heap[i]);
+			if (cmp < 0)
+				return -1;
+			else if (cmp)
+				min = j;
+		}
+
+		if (k < pq->len) {
+			cmp = pq_less(&pq->heap[k], &pq->heap[min]);
+			if (cmp < 0)
+				return -1;
+			else if (cmp)
+				min = k;
+		}
+
 		if (min == i)
 			break;
 		SWAP(pq->heap[i], pq->heap[min]);
 		i = min;
 	}
 
-	return e;
+	if (out)
+		*out = e;
+
+	return 0;
 }
 
 int merged_iter_pqueue_add(struct merged_iter_pqueue *pq, const struct pq_entry *e)
diff --git a/reftable/pq.h b/reftable/pq.h
index 83c062eecac..ff39016445b 100644
--- a/reftable/pq.h
+++ b/reftable/pq.h
@@ -22,7 +22,7 @@ struct merged_iter_pqueue {
 	size_t cap;
 };
 
-struct pq_entry merged_iter_pqueue_remove(struct merged_iter_pqueue *pq);
+int merged_iter_pqueue_remove(struct merged_iter_pqueue *pq, struct pq_entry *out);
 int merged_iter_pqueue_add(struct merged_iter_pqueue *pq, const struct pq_entry *e);
 void merged_iter_pqueue_release(struct merged_iter_pqueue *pq);
 int pq_less(struct pq_entry *a, struct pq_entry *b);
diff --git a/reftable/record.c b/reftable/record.c
index 1e18f8dffb1..b39d99fcc75 100644
--- a/reftable/record.c
+++ b/reftable/record.c
@@ -1195,12 +1195,14 @@ int reftable_record_is_deletion(struct reftable_record *rec)
 		reftable_record_data(rec));
 }
 
-int reftable_record_cmp(struct reftable_record *a, struct reftable_record *b)
+int reftable_record_cmp(struct reftable_record *a, struct reftable_record *b,
+			int *cmp)
 {
 	if (a->type != b->type)
-		BUG("cannot compare reftable records of different type");
-	return reftable_record_vtable(a)->cmp(
-		reftable_record_data(a), reftable_record_data(b));
+		return -1;
+	*cmp = reftable_record_vtable(a)->cmp(reftable_record_data(a),
+					      reftable_record_data(b));
+	return 0;
 }
 
 int reftable_record_equal(struct reftable_record *a, struct reftable_record *b, uint32_t hash_size)
diff --git a/reftable/record.h b/reftable/record.h
index e1846c294ba..867810a9328 100644
--- a/reftable/record.h
+++ b/reftable/record.h
@@ -134,7 +134,7 @@ struct reftable_record {
 int reftable_record_init(struct reftable_record *rec, uint8_t typ);
 
 /* see struct record_vtable */
-int reftable_record_cmp(struct reftable_record *a, struct reftable_record *b);
+int reftable_record_cmp(struct reftable_record *a, struct reftable_record *b, int *cmp);
 int reftable_record_equal(struct reftable_record *a, struct reftable_record *b, uint32_t hash_size);
 int reftable_record_key(struct reftable_record *rec, struct reftable_buf *dest);
 int reftable_record_copy_from(struct reftable_record *rec,
diff --git a/t/unit-tests/t-reftable-pq.c b/t/unit-tests/t-reftable-pq.c
index d8a4c283a11..c128fe8616a 100644
--- a/t/unit-tests/t-reftable-pq.c
+++ b/t/unit-tests/t-reftable-pq.c
@@ -21,7 +21,9 @@ static void merged_iter_pqueue_check(const struct merged_iter_pqueue *pq)
 
 static int pq_entry_equal(struct pq_entry *a, struct pq_entry *b)
 {
-	return !reftable_record_cmp(a->rec, b->rec) && (a->index == b->index);
+	int cmp;
+	check(!reftable_record_cmp(a->rec, b->rec, &cmp));
+	return !cmp && (a->index == b->index);
 }
 
 static void t_pq_record(void)
@@ -49,7 +51,9 @@ static void t_pq_record(void)
 
 	while (!merged_iter_pqueue_is_empty(pq)) {
 		struct pq_entry top = merged_iter_pqueue_top(pq);
-		struct pq_entry e = merged_iter_pqueue_remove(&pq);
+		struct pq_entry e;
+
+		check(!merged_iter_pqueue_remove(&pq, &e));
 		merged_iter_pqueue_check(&pq);
 
 		check(pq_entry_equal(&top, &e));
@@ -90,7 +94,9 @@ static void t_pq_index(void)
 
 	for (i = N - 1; i > 0; i--) {
 		struct pq_entry top = merged_iter_pqueue_top(pq);
-		struct pq_entry e = merged_iter_pqueue_remove(&pq);
+		struct pq_entry e;
+
+		check(!merged_iter_pqueue_remove(&pq, &e));
 		merged_iter_pqueue_check(&pq);
 
 		check(pq_entry_equal(&top, &e));
@@ -129,7 +135,9 @@ static void t_merged_iter_pqueue_top(void)
 
 	for (i = N - 1; i > 0; i--) {
 		struct pq_entry top = merged_iter_pqueue_top(pq);
-		struct pq_entry e = merged_iter_pqueue_remove(&pq);
+		struct pq_entry e;
+
+		check(!merged_iter_pqueue_remove(&pq, &e));
 
 		merged_iter_pqueue_check(&pq);
 		check(pq_entry_equal(&top, &e));
diff --git a/t/unit-tests/t-reftable-record.c b/t/unit-tests/t-reftable-record.c
index 6540bd20e37..59549663736 100644
--- a/t/unit-tests/t-reftable-record.c
+++ b/t/unit-tests/t-reftable-record.c
@@ -100,16 +100,20 @@ static void t_reftable_ref_record_comparison(void)
 			.u.ref.value.symref = (char *) "refs/heads/master",
 		},
 	};
+	int cmp;
 
 	check(!reftable_record_equal(&in[0], &in[1], REFTABLE_HASH_SIZE_SHA1));
-	check(!reftable_record_cmp(&in[0], &in[1]));
+	check(!reftable_record_cmp(&in[0], &in[1], &cmp));
+	check(!cmp);
 
 	check(!reftable_record_equal(&in[1], &in[2], REFTABLE_HASH_SIZE_SHA1));
-	check_int(reftable_record_cmp(&in[1], &in[2]), >, 0);
+	check(!reftable_record_cmp(&in[1], &in[2], &cmp));
+	check_int(cmp, >, 0);
 
 	in[1].u.ref.value_type = in[0].u.ref.value_type;
 	check(reftable_record_equal(&in[0], &in[1], REFTABLE_HASH_SIZE_SHA1));
-	check(!reftable_record_cmp(&in[0], &in[1]));
+	check(!reftable_record_cmp(&in[0], &in[1], &cmp));
+	check(!cmp);
 }
 
 static void t_reftable_ref_record_compare_name(void)
@@ -209,17 +213,20 @@ static void t_reftable_log_record_comparison(void)
 			.u.log.update_index = 22,
 		},
 	};
+	int cmp;
 
 	check(!reftable_record_equal(&in[0], &in[1], REFTABLE_HASH_SIZE_SHA1));
 	check(!reftable_record_equal(&in[1], &in[2], REFTABLE_HASH_SIZE_SHA1));
-	check_int(reftable_record_cmp(&in[1], &in[2]), >, 0);
+	check(!reftable_record_cmp(&in[1], &in[2], &cmp));
+	check_int(cmp, >, 0);
 	/* comparison should be reversed for equal keys, because
 	 * comparison is now performed on the basis of update indices */
-	check_int(reftable_record_cmp(&in[0], &in[1]), <, 0);
+	check(!reftable_record_cmp(&in[0], &in[1], &cmp));
+	check_int(cmp, <, 0);
 
 	in[1].u.log.update_index = in[0].u.log.update_index;
 	check(reftable_record_equal(&in[0], &in[1], REFTABLE_HASH_SIZE_SHA1));
-	check(!reftable_record_cmp(&in[0], &in[1]));
+	check(!reftable_record_cmp(&in[0], &in[1], &cmp));
 }
 
 static void t_reftable_log_record_compare_key(void)
@@ -396,16 +403,20 @@ static void t_reftable_obj_record_comparison(void)
 			.u.obj.hash_prefix_len = 5,
 		},
 	};
+	int cmp;
 
 	check(!reftable_record_equal(&in[0], &in[1], REFTABLE_HASH_SIZE_SHA1));
-	check(!reftable_record_cmp(&in[0], &in[1]));
+	check(!reftable_record_cmp(&in[0], &in[1], &cmp));
+	check(!cmp);
 
 	check(!reftable_record_equal(&in[1], &in[2], REFTABLE_HASH_SIZE_SHA1));
-	check_int(reftable_record_cmp(&in[1], &in[2]), >, 0);
+	check(!reftable_record_cmp(&in[1], &in[2], &cmp));
+	check_int(cmp, >, 0);
 
 	in[1].u.obj.offset_len = in[0].u.obj.offset_len;
 	check(reftable_record_equal(&in[0], &in[1], REFTABLE_HASH_SIZE_SHA1));
-	check(!reftable_record_cmp(&in[0], &in[1]));
+	check(!reftable_record_cmp(&in[0], &in[1], &cmp));
+	check(!cmp);
 }
 
 static void t_reftable_obj_record_roundtrip(void)
@@ -486,19 +497,24 @@ static void t_reftable_index_record_comparison(void)
 			.u.idx.last_key = REFTABLE_BUF_INIT,
 		},
 	};
+	int cmp;
+
 	check(!reftable_buf_addstr(&in[0].u.idx.last_key, "refs/heads/master"));
 	check(!reftable_buf_addstr(&in[1].u.idx.last_key, "refs/heads/master"));
 	check(!reftable_buf_addstr(&in[2].u.idx.last_key, "refs/heads/branch"));
 
 	check(!reftable_record_equal(&in[0], &in[1], REFTABLE_HASH_SIZE_SHA1));
-	check(!reftable_record_cmp(&in[0], &in[1]));
+	check(!reftable_record_cmp(&in[0], &in[1], &cmp));
+	check(!cmp);
 
 	check(!reftable_record_equal(&in[1], &in[2], REFTABLE_HASH_SIZE_SHA1));
-	check_int(reftable_record_cmp(&in[1], &in[2]), >, 0);
+	check(!reftable_record_cmp(&in[1], &in[2], &cmp));
+	check_int(cmp, >, 0);
 
 	in[1].u.idx.offset = in[0].u.idx.offset;
 	check(reftable_record_equal(&in[0], &in[1], REFTABLE_HASH_SIZE_SHA1));
-	check(!reftable_record_cmp(&in[0], &in[1]));
+	check(!reftable_record_cmp(&in[0], &in[1], &cmp));
+	check(!cmp);
 
 	for (size_t i = 0; i < ARRAY_SIZE(in); i++)
 		reftable_record_release(&in[i]);

-- 
2.48.1.666.gff9fcf71b7.dirty


  parent reply	other threads:[~2025-02-18  9:22 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   ` [PATCH v4 09/18] reftable/basics: provide wrappers for big endian conversion Patrick Steinhardt
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   ` Patrick Steinhardt [this message]
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=20250218-pks-reftable-drop-git-compat-util-v6-6-8c1f39fb4c02@pks.im \
    --to=ps@pks.im \
    --cc=Johannes.Schindelin@gmx.de \
    --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).