git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH v5 24/25] reftable: introduce `REFTABLE_FREE_AND_NULL()`

From
Patrick Steinhardt <ps@pks.im>
Date
Oct 2, 2024, 10:56 UTC
Message-ID
<1c66f6ef8d9827653fd9df960330431877e1dbc9.1727866394.git.ps@pks.im>
In-Reply-To
<cover.1727866394.git.ps@pks.im>

We have several calls to `FREE_AND_NULL()` in the reftable library, which of course uses free(3P). As the reftable allocators are pluggable we should rather call the reftable specific function, which is `reftable_free()`.

Introduce a new macro `REFTABLE_FREE_AND_NULL()` and adapt the callsites accordingly.

Signed-off-by: Patrick Steinhardt <ps@pks.im>
---
 reftable/basics.h               |  1 +
 reftable/block.c                |  6 +++---
 reftable/iter.c                 |  2 +-
 reftable/pq.c                   |  2 +-
 reftable/reader.c               |  2 +-
 reftable/record.c               | 10 +++++-----
 reftable/stack.c                |  8 ++++----
 reftable/writer.c               |  4 ++--
 t/unit-tests/t-reftable-stack.c |  2 +-
 9 files changed, 19 insertions(+), 18 deletions(-)
diff --git a/reftable/basics.h b/reftable/basics.h
index 69adeab2e4..7f0f20e50c 100644
--- a/reftable/basics.h
+++ b/reftable/basics.h
@@ -71,6 +71,7 @@ char *reftable_strdup(const char *str);
 			REFTABLE_REALLOC_ARRAY(x, alloc); \
 		} \
 	} while (0)
+#define REFTABLE_FREE_AND_NULL(p) do { reftable_free(p); (p) = NULL; } while (0)
 
 /* Find the longest shared prefix size of `a` and `b` */
 struct strbuf;
diff --git a/reftable/block.c b/reftable/block.c
index bfa7dc61bf..8d41a2f99e 100644
--- a/reftable/block.c
+++ b/reftable/block.c
@@ -551,9 +551,9 @@ int block_iter_seek_key(struct block_iter *it, const struct block_reader *br,
 void block_writer_release(struct block_writer *bw)
 {
 	deflateEnd(bw->zstream);
-	FREE_AND_NULL(bw->zstream);
-	FREE_AND_NULL(bw->restarts);
-	FREE_AND_NULL(bw->compressed);
+	REFTABLE_FREE_AND_NULL(bw->zstream);
+	REFTABLE_FREE_AND_NULL(bw->restarts);
+	REFTABLE_FREE_AND_NULL(bw->compressed);
 	strbuf_release(&bw->last_key);
 	/* the block is not owned. */
 }
diff --git a/reftable/iter.c b/reftable/iter.c
index d319538f80..d926db653b 100644
--- a/reftable/iter.c
+++ b/reftable/iter.c
@@ -237,7 +237,7 @@ void reftable_iterator_destroy(struct reftable_iterator *it)
 		return;
 	it->ops->close(it->iter_arg);
 	it->ops = NULL;
-	FREE_AND_NULL(it->iter_arg);
+	REFTABLE_FREE_AND_NULL(it->iter_arg);
 }
 
 int reftable_iterator_seek_ref(struct reftable_iterator *it,
diff --git a/reftable/pq.c b/reftable/pq.c
index 03b9912282..6ee1164dd3 100644
--- a/reftable/pq.c
+++ b/reftable/pq.c
@@ -68,6 +68,6 @@ int merged_iter_pqueue_add(struct merged_iter_pqueue *pq, const struct pq_entry
 
 void merged_iter_pqueue_release(struct merged_iter_pqueue *pq)
 {
-	FREE_AND_NULL(pq->heap);
+	REFTABLE_FREE_AND_NULL(pq->heap);
 	memset(pq, 0, sizeof(*pq));
 }
diff --git a/reftable/reader.c b/reftable/reader.c
index 98e7aa2637..8d37253922 100644
--- a/reftable/reader.c
+++ b/reftable/reader.c
@@ -678,7 +678,7 @@ void reftable_reader_decref(struct reftable_reader *r)
 	if (--r->refcount)
 		return;
 	block_source_close(&r->source);
-	FREE_AND_NULL(r->name);
+	REFTABLE_FREE_AND_NULL(r->name);
 	reftable_free(r);
 }
 
diff --git a/reftable/record.c b/reftable/record.c
index 787e134c9a..30d563e16d 100644
--- a/reftable/record.c
+++ b/reftable/record.c
@@ -476,8 +476,8 @@ static void reftable_obj_record_key(const void *r, struct strbuf *dest)
 static void reftable_obj_record_release(void *rec)
 {
 	struct reftable_obj_record *obj = rec;
-	FREE_AND_NULL(obj->hash_prefix);
-	FREE_AND_NULL(obj->offsets);
+	REFTABLE_FREE_AND_NULL(obj->hash_prefix);
+	REFTABLE_FREE_AND_NULL(obj->offsets);
 	memset(obj, 0, sizeof(struct reftable_obj_record));
 }
 
@@ -834,10 +834,10 @@ static int reftable_log_record_decode(void *rec, struct strbuf key,
 	if (val_type != r->value_type) {
 		switch (r->value_type) {
 		case REFTABLE_LOG_UPDATE:
-			FREE_AND_NULL(r->value.update.message);
+			REFTABLE_FREE_AND_NULL(r->value.update.message);
 			r->value.update.message_cap = 0;
-			FREE_AND_NULL(r->value.update.email);
-			FREE_AND_NULL(r->value.update.name);
+			REFTABLE_FREE_AND_NULL(r->value.update.email);
+			REFTABLE_FREE_AND_NULL(r->value.update.name);
 			break;
 		case REFTABLE_LOG_DELETION:
 			break;
diff --git a/reftable/stack.c b/reftable/stack.c
index b2babe8e3d..63976e5cea 100644
--- a/reftable/stack.c
+++ b/reftable/stack.c
@@ -203,7 +203,7 @@ void reftable_stack_destroy(struct reftable_stack *st)
 
 	err = read_lines(st->list_file, &names);
 	if (err < 0) {
-		FREE_AND_NULL(names);
+		REFTABLE_FREE_AND_NULL(names);
 	}
 
 	if (st->readers) {
@@ -224,7 +224,7 @@ void reftable_stack_destroy(struct reftable_stack *st)
 		}
 		strbuf_release(&filename);
 		st->readers_len = 0;
-		FREE_AND_NULL(st->readers);
+		REFTABLE_FREE_AND_NULL(st->readers);
 	}
 
 	if (st->list_fd >= 0) {
@@ -232,8 +232,8 @@ void reftable_stack_destroy(struct reftable_stack *st)
 		st->list_fd = -1;
 	}
 
-	FREE_AND_NULL(st->list_file);
-	FREE_AND_NULL(st->reftable_dir);
+	REFTABLE_FREE_AND_NULL(st->list_file);
+	REFTABLE_FREE_AND_NULL(st->reftable_dir);
 	reftable_free(st);
 	free_names(names);
 }
diff --git a/reftable/writer.c b/reftable/writer.c
index 550172e65c..b032a47dec 100644
--- a/reftable/writer.c
+++ b/reftable/writer.c
@@ -593,7 +593,7 @@ static void object_record_free(void *void_arg UNUSED, void *key)
 {
 	struct obj_index_tree_node *entry = key;
 
-	FREE_AND_NULL(entry->offsets);
+	REFTABLE_FREE_AND_NULL(entry->offsets);
 	strbuf_release(&entry->hash);
 	reftable_free(entry);
 }
@@ -709,7 +709,7 @@ static void writer_clear_index(struct reftable_writer *w)
 {
 	for (size_t i = 0; w->index && i < w->index_len; i++)
 		strbuf_release(&w->index[i].last_key);
-	FREE_AND_NULL(w->index);
+	REFTABLE_FREE_AND_NULL(w->index);
 	w->index_len = 0;
 	w->index_cap = 0;
 }
diff --git a/t/unit-tests/t-reftable-stack.c b/t/unit-tests/t-reftable-stack.c
index 6e41a4cf7e..cc2db2cdef 100644
--- a/t/unit-tests/t-reftable-stack.c
+++ b/t/unit-tests/t-reftable-stack.c
@@ -1149,7 +1149,7 @@ static void unclean_stack_close(struct reftable_stack *st)
 	for (size_t i = 0; i < st->readers_len; i++)
 		reftable_reader_decref(st->readers[i]);
 	st->readers_len = 0;
-	FREE_AND_NULL(st->readers);
+	REFTABLE_FREE_AND_NULL(st->readers);
 }
 
 static void t_reftable_stack_compaction_concurrent_clean(void)
-- 
2.47.0.rc0.dirty
Previous: Patrick SteinhardtNext: Patrick Steinhardt
Message 149 of 151 in “reftable: handle allocation errors”
  1. 00/22 reftable: handle allocation errorsPatrick Steinhardt, Sep 16, 2024
  2. 01/22 reftable/error: introduce out-of-memory error codePatrick Steinhardt, Sep 16, 2024
  3. 02/22 reftable/basics: merge "publicbasics" into "basics"Patrick Steinhardt, Sep 16, 2024
  4. 03/22 reftable: introduce `reftable_strdup()`Patrick Steinhardt, Sep 16, 2024
  5. 04/22 reftable/basics: handle allocation failures in `reftable_calloc()`Patrick Steinhardt, Sep 16, 2024
  6. Junio C HamanoSep 21, 2024
  7. Patrick SteinhardtSep 24, 2024
  8. Patrick SteinhardtSep 24, 2024
  9. Junio C HamanoSep 24, 2024
  10. 05/22 reftable/basics: handle allocation failures in `parse_names()`Patrick Steinhardt, Sep 16, 2024
  11. 06/22 reftable/record: handle allocation failures on copyPatrick Steinhardt, Sep 16, 2024
  12. 07/22 reftable/record: handle allocation failures when decoding recordsPatrick Steinhardt, Sep 16, 2024
  13. 08/22 reftable/writer: handle allocation failures in `writer_index_hash()`Patrick Steinhardt, Sep 16, 2024
  14. 09/22 reftable/writer: handle allocation failures in `reftable_new_writer()`Patrick Steinhardt, Sep 16, 2024
  15. 10/22 reftable/merged: handle allocation failures in `merged_table_init_iter()`Patrick Steinhardt, Sep 16, 2024
  16. 11/22 reftable/reader: handle allocation failures for unindexed readerPatrick Steinhardt, Sep 16, 2024
  17. 12/22 reftable/reader: handle allocation failures in `reader_init_iter()`Patrick Steinhardt, Sep 16, 2024
  18. 13/22 reftable/stack: handle allocation failures on reloadPatrick Steinhardt, Sep 16, 2024
  19. 14/22 reftable/stack: handle allocation failures in `reftable_new_stack()`Patrick Steinhardt, Sep 16, 2024
  20. 15/22 reftable/stack: handle allocation failures in `stack_compact_range()`Patrick Steinhardt, Sep 16, 2024
  21. 16/22 reftable/stack: handle allocation failures in auto compactionPatrick Steinhardt, Sep 16, 2024
  22. 17/22 reftable/iter: handle allocation failures when creating indexed table iterPatrick Steinhardt, Sep 16, 2024
  23. Junio C HamanoSep 22, 2024
  24. Patrick SteinhardtSep 24, 2024
  25. 18/22 reftable/blocksource: handle allocation failuresPatrick Steinhardt, Sep 16, 2024
  26. 19/22 reftable/block: handle allocation failuresPatrick Steinhardt, Sep 16, 2024
  27. 20/22 reftable/pq: handle allocation failures when adding entriesPatrick Steinhardt, Sep 16, 2024
  28. 21/22 reftable/tree: handle allocation failuresPatrick Steinhardt, Sep 16, 2024
  29. 22/22 reftable: handle trivial allocation failuresPatrick Steinhardt, Sep 16, 2024
  30. 00/22 reftable: handle allocation errorsPatrick Steinhardt, Sep 24, 2024
  31. 01/22 reftable/error: introduce out-of-memory error codePatrick Steinhardt, Sep 24, 2024
  32. 02/22 reftable/basics: merge "publicbasics" into "basics"Patrick Steinhardt, Sep 24, 2024
  33. 03/22 reftable: introduce `reftable_strdup()`Patrick Steinhardt, Sep 24, 2024
  34. 04/22 reftable/basics: handle allocation failures in `reftable_calloc()`Patrick Steinhardt, Sep 24, 2024
  35. Junio C HamanoSep 24, 2024
  36. Patrick SteinhardtSep 26, 2024
  37. Junio C HamanoSep 26, 2024
  38. Patrick SteinhardtSep 27, 2024
  39. Han-Wen NienhuysSep 27, 2024
  40. Junio C HamanoSep 27, 2024
  41. 05/22 reftable/basics: handle allocation failures in `parse_names()`Patrick Steinhardt, Sep 24, 2024
  42. René ScharfeSep 24, 2024
  43. Patrick SteinhardtSep 26, 2024
  44. 06/22 reftable/record: handle allocation failures on copyPatrick Steinhardt, Sep 24, 2024
  45. 07/22 reftable/record: handle allocation failures when decoding recordsPatrick Steinhardt, Sep 24, 2024
  46. 08/22 reftable/writer: handle allocation failures in `writer_index_hash()`Patrick Steinhardt, Sep 24, 2024
  47. 09/22 reftable/writer: handle allocation failures in `reftable_new_writer()`Patrick Steinhardt, Sep 24, 2024
  48. 10/22 reftable/merged: handle allocation failures in `merged_table_init_iter()`Patrick Steinhardt, Sep 24, 2024
  49. 11/22 reftable/reader: handle allocation failures for unindexed readerPatrick Steinhardt, Sep 24, 2024
  50. 12/22 reftable/reader: handle allocation failures in `reader_init_iter()`Patrick Steinhardt, Sep 24, 2024
  51. 13/22 reftable/stack: handle allocation failures on reloadPatrick Steinhardt, Sep 24, 2024
  52. 14/22 reftable/stack: handle allocation failures in `reftable_new_stack()`Patrick Steinhardt, Sep 24, 2024
  53. 15/22 reftable/stack: handle allocation failures in `stack_compact_range()`Patrick Steinhardt, Sep 24, 2024
  54. 16/22 reftable/stack: handle allocation failures in auto compactionPatrick Steinhardt, Sep 24, 2024
  55. 17/22 reftable/iter: handle allocation failures when creating indexed table iterPatrick Steinhardt, Sep 24, 2024
  56. 18/22 reftable/blocksource: handle allocation failuresPatrick Steinhardt, Sep 24, 2024
  57. 19/22 reftable/block: handle allocation failuresPatrick Steinhardt, Sep 24, 2024
  58. 20/22 reftable/pq: handle allocation failures when adding entriesPatrick Steinhardt, Sep 24, 2024
  59. 21/22 reftable/tree: handle allocation failuresPatrick Steinhardt, Sep 24, 2024
  60. 22/22 reftable: handle trivial allocation failuresPatrick Steinhardt, Sep 24, 2024
  61. 00/22 refatble: handle allocation errorsPatrick Steinhardt, Sep 30, 2024
  62. 01/22 reftable/error: introduce out-of-memory error codePatrick Steinhardt, Sep 30, 2024
  63. 02/22 reftable/basics: merge "publicbasics" into "basics"Patrick Steinhardt, Sep 30, 2024
  64. 03/22 reftable: introduce `reftable_strdup()`Patrick Steinhardt, Sep 30, 2024
  65. 04/22 reftable/basics: handle allocation failures in `reftable_calloc()`Patrick Steinhardt, Sep 30, 2024
  66. 05/22 reftable/basics: handle allocation failures in `parse_names()`Patrick Steinhardt, Sep 30, 2024
  67. René ScharfeSep 30, 2024
  68. 06/22 reftable/record: handle allocation failures on copyPatrick Steinhardt, Sep 30, 2024
  69. 07/22 reftable/record: handle allocation failures when decoding recordsPatrick Steinhardt, Sep 30, 2024
  70. 08/22 reftable/writer: handle allocation failures in `writer_index_hash()`Patrick Steinhardt, Sep 30, 2024
  71. 09/22 reftable/writer: handle allocation failures in `reftable_new_writer()`Patrick Steinhardt, Sep 30, 2024
  72. René ScharfeSep 30, 2024
  73. Patrick SteinhardtSep 30, 2024
  74. Junio C HamanoSep 30, 2024
  75. 10/22 reftable/merged: handle allocation failures in `merged_table_init_iter()`Patrick Steinhardt, Sep 30, 2024
  76. 11/22 reftable/reader: handle allocation failures for unindexed readerPatrick Steinhardt, Sep 30, 2024
  77. 12/22 reftable/reader: handle allocation failures in `reader_init_iter()`Patrick Steinhardt, Sep 30, 2024
  78. 13/22 reftable/stack: handle allocation failures on reloadPatrick Steinhardt, Sep 30, 2024
  79. 14/22 reftable/stack: handle allocation failures in `reftable_new_stack()`Patrick Steinhardt, Sep 30, 2024
  80. 15/22 reftable/stack: handle allocation failures in `stack_compact_range()`Patrick Steinhardt, Sep 30, 2024
  81. 16/22 reftable/stack: handle allocation failures in auto compactionPatrick Steinhardt, Sep 30, 2024
  82. 17/22 reftable/iter: handle allocation failures when creating indexed table iterPatrick Steinhardt, Sep 30, 2024
  83. 18/22 reftable/blocksource: handle allocation failuresPatrick Steinhardt, Sep 30, 2024
  84. 19/22 reftable/block: handle allocation failuresPatrick Steinhardt, Sep 30, 2024
  85. 20/22 reftable/pq: handle allocation failures when adding entriesPatrick Steinhardt, Sep 30, 2024
  86. 21/22 reftable/tree: handle allocation failuresPatrick Steinhardt, Sep 30, 2024
  87. 22/22 reftable: handle trivial allocation failuresPatrick Steinhardt, Sep 30, 2024
  88. Junio C HamanoSep 30, 2024
  89. 00/25 reftable: handle allocation errorsPatrick Steinhardt, Oct 1, 2024
  90. 01/25 reftable/error: introduce out-of-memory error codePatrick Steinhardt, Oct 1, 2024
  91. 02/25 reftable/basics: merge "publicbasics" into "basics"Patrick Steinhardt, Oct 1, 2024
  92. 03/25 reftable: introduce `reftable_strdup()`Patrick Steinhardt, Oct 1, 2024
  93. 04/25 reftable/basics: handle allocation failures in `reftable_calloc()`Patrick Steinhardt, Oct 1, 2024
  94. 05/25 reftable/basics: handle allocation failures in `parse_names()`Patrick Steinhardt, Oct 1, 2024
  95. 06/25 reftable/record: handle allocation failures on copyPatrick Steinhardt, Oct 1, 2024
  96. 07/25 reftable/record: handle allocation failures when decoding recordsPatrick Steinhardt, Oct 1, 2024
  97. 08/25 reftable/writer: handle allocation failures in `writer_index_hash()`Patrick Steinhardt, Oct 1, 2024
  98. 09/25 reftable/writer: handle allocation failures in `reftable_new_writer()`Patrick Steinhardt, Oct 1, 2024
  99. 10/25 reftable/merged: handle allocation failures in `merged_table_init_iter()`Patrick Steinhardt, Oct 1, 2024
  100. 11/25 reftable/reader: handle allocation failures for unindexed readerPatrick Steinhardt, Oct 1, 2024
  101. 12/25 reftable/reader: handle allocation failures in `reader_init_iter()`Patrick Steinhardt, Oct 1, 2024
  102. 13/25 reftable/stack: handle allocation failures on reloadPatrick Steinhardt, Oct 1, 2024
  103. 14/25 reftable/stack: handle allocation failures in `reftable_new_stack()`Patrick Steinhardt, Oct 1, 2024
  104. 15/25 reftable/stack: handle allocation failures in `stack_compact_range()`Patrick Steinhardt, Oct 1, 2024
  105. 16/25 reftable/stack: handle allocation failures in auto compactionPatrick Steinhardt, Oct 1, 2024
  106. 17/25 reftable/iter: handle allocation failures when creating indexed table iterPatrick Steinhardt, Oct 1, 2024
  107. 18/25 reftable/blocksource: handle allocation failuresPatrick Steinhardt, Oct 1, 2024
  108. 19/25 reftable/block: handle allocation failuresPatrick Steinhardt, Oct 1, 2024
  109. 20/25 reftable/pq: handle allocation failures when adding entriesPatrick Steinhardt, Oct 1, 2024
  110. 21/25 reftable/tree: handle allocation failuresPatrick Steinhardt, Oct 1, 2024
  111. 22/25 reftable: handle trivial allocation failuresPatrick Steinhardt, Oct 1, 2024
  112. 23/25 reftable: fix calls to free(3P)Patrick Steinhardt, Oct 1, 2024
  113. 24/25 reftable: introduce `REFTABLE_FREE_AND_NULL()`Patrick Steinhardt, Oct 1, 2024
  114. 25/25 reftable/basics: ban standard allocator functionsPatrick Steinhardt, Oct 1, 2024
  115. Junio C HamanoOct 1, 2024
  116. Patrick SteinhardtOct 2, 2024
  117. Junio C HamanoOct 1, 2024
  118. René ScharfeOct 1, 2024
  119. Junio C HamanoOct 1, 2024
  120. Patrick SteinhardtOct 2, 2024
  121. Junio C HamanoOct 2, 2024
  122. 00/25 reftable: handle allocation errorsPatrick Steinhardt, Oct 2, 2024
  123. 01/25 reftable/error: introduce out-of-memory error codePatrick Steinhardt, Oct 2, 2024
  124. 02/25 reftable/basics: merge "publicbasics" into "basics"Patrick Steinhardt, Oct 2, 2024
  125. 03/25 reftable: introduce `reftable_strdup()`Patrick Steinhardt, Oct 2, 2024
  126. 04/25 reftable/basics: handle allocation failures in `reftable_calloc()`Patrick Steinhardt, Oct 2, 2024
  127. 05/25 reftable/basics: handle allocation failures in `parse_names()`Patrick Steinhardt, Oct 2, 2024
  128. Eric SunshineOct 2, 2024
  129. Patrick SteinhardtOct 4, 2024
  130. Eric SunshineOct 4, 2024
  131. 06/25 reftable/record: handle allocation failures on copyPatrick Steinhardt, Oct 2, 2024
  132. 07/25 reftable/record: handle allocation failures when decoding recordsPatrick Steinhardt, Oct 2, 2024
  133. 08/25 reftable/writer: handle allocation failures in `writer_index_hash()`Patrick Steinhardt, Oct 2, 2024
  134. 09/25 reftable/writer: handle allocation failures in `reftable_new_writer()`Patrick Steinhardt, Oct 2, 2024
  135. 10/25 reftable/merged: handle allocation failures in `merged_table_init_iter()`Patrick Steinhardt, Oct 2, 2024
  136. 11/25 reftable/reader: handle allocation failures for unindexed readerPatrick Steinhardt, Oct 2, 2024
  137. 12/25 reftable/reader: handle allocation failures in `reader_init_iter()`Patrick Steinhardt, Oct 2, 2024
  138. 13/25 reftable/stack: handle allocation failures on reloadPatrick Steinhardt, Oct 2, 2024
  139. 14/25 reftable/stack: handle allocation failures in `reftable_new_stack()`Patrick Steinhardt, Oct 2, 2024
  140. 15/25 reftable/stack: handle allocation failures in `stack_compact_range()`Patrick Steinhardt, Oct 2, 2024
  141. 16/25 reftable/stack: handle allocation failures in auto compactionPatrick Steinhardt, Oct 2, 2024
  142. 17/25 reftable/iter: handle allocation failures when creating indexed table iterPatrick Steinhardt, Oct 2, 2024
  143. 18/25 reftable/blocksource: handle allocation failuresPatrick Steinhardt, Oct 2, 2024
  144. 19/25 reftable/block: handle allocation failuresPatrick Steinhardt, Oct 2, 2024
  145. 20/25 reftable/pq: handle allocation failures when adding entriesPatrick Steinhardt, Oct 2, 2024
  146. 21/25 reftable/tree: handle allocation failuresPatrick Steinhardt, Oct 2, 2024
  147. 22/25 reftable: handle trivial allocation failuresPatrick Steinhardt, Oct 2, 2024
  148. 23/25 reftable: fix calls to free(3P)Patrick Steinhardt, Oct 2, 2024
  149. 24/25 reftable: introduce `REFTABLE_FREE_AND_NULL()`Patrick Steinhardt, Oct 2, 2024
  150. 25/25 reftable/basics: ban standard allocator functionsPatrick Steinhardt, Oct 2, 2024
  151. Junio C HamanoOct 2, 2024

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.