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

[PATCH v2 02/13] reftable: define the public API

From
Han-Wen Nienhuys via GitGitGadget <gitgitgadget@gmail.com>
Date
Oct 1, 2020, 16:10 UTC
Message-ID
<5d1b946ab5473504e9599d90c0feda407a179a05.1601568663.git.gitgitgadget@gmail.com>
In-Reply-To
<pull.847.v2.git.git.1601568663.gitgitgadget@gmail.com>
From: Han-Wen Nienhuys <hanwen@google.com>
Signed-off-by: Han-Wen Nienhuys <hanwen@google.com>
---
 reftable/reftable.h | 585 ++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 585 insertions(+)
 create mode 100644 reftable/reftable.h
diff --git a/reftable/reftable.h b/reftable/reftable.h
new file mode 100644
index 0000000000..5f8ebf5540
--- /dev/null
+++ b/reftable/reftable.h
@@ -0,0 +1,585 @@
+/*
+Copyright 2020 Google LLC
+
+Use of this source code is governed by a BSD-style
+license that can be found in the LICENSE file or at
+https://developers.google.com/open-source/licenses/bsd
+*/
+
+#ifndef REFTABLE_H
+#define REFTABLE_H
+
+#include <stdint.h>
+#include <stddef.h>
+
+void reftable_set_alloc(void *(*malloc)(size_t),
+			void *(*realloc)(void *, size_t), void (*free)(void *));
+
+/****************************************************************
+ Basic data types
+
+ Reftables store the state of each ref in struct reftable_ref_record, and they
+ store a sequence of reflog updates in struct reftable_log_record.
+ ****************************************************************/
+
+/* reftable_ref_record holds a ref database entry target_value */
+struct reftable_ref_record {
+	char *refname; /* Name of the ref, malloced. */
+	uint64_t update_index; /* Logical timestamp at which this value is
+				  written */
+	uint8_t *value; /* SHA1, or NULL. malloced. */
+	uint8_t *target_value; /* peeled annotated tag, or NULL. malloced. */
+	char *target; /* symref, or NULL. malloced. */
+};
+
+/* returns whether 'ref' represents a deletion */
+int reftable_ref_record_is_deletion(const struct reftable_ref_record *ref);
+
+/* prints a reftable_ref_record onto stdout */
+void reftable_ref_record_print(struct reftable_ref_record *ref,
+			       uint32_t hash_id);
+
+/* frees and nulls all pointer values. */
+void reftable_ref_record_clear(struct reftable_ref_record *ref);
+
+/* returns whether two reftable_ref_records are the same */
+int reftable_ref_record_equal(struct reftable_ref_record *a,
+			      struct reftable_ref_record *b, int hash_size);
+
+/* reftable_log_record holds a reflog entry */
+struct reftable_log_record {
+	char *refname;
+	uint64_t update_index; /* logical timestamp of a transactional update.
+				*/
+	uint8_t *new_hash;
+	uint8_t *old_hash;
+	char *name;
+	char *email;
+	uint64_t time;
+	int16_t tz_offset;
+	char *message;
+};
+
+/* returns whether 'ref' represents the deletion of a log record. */
+int reftable_log_record_is_deletion(const struct reftable_log_record *log);
+
+/* frees and nulls all pointer values. */
+void reftable_log_record_clear(struct reftable_log_record *log);
+
+/* returns whether two records are equal. */
+int reftable_log_record_equal(struct reftable_log_record *a,
+			      struct reftable_log_record *b, int hash_size);
+
+/* dumps a reftable_log_record on stdout, for debugging/testing. */
+void reftable_log_record_print(struct reftable_log_record *log,
+			       uint32_t hash_id);
+
+/****************************************************************
+ Error handling
+
+ Error are signaled with negative integer return values. 0 means success.
+ ****************************************************************/
+
+/* different types of errors */
+enum reftable_error {
+	/* Unexpected file system behavior */
+	REFTABLE_IO_ERROR = -2,
+
+	/* Format inconsistency on reading data
+	 */
+	REFTABLE_FORMAT_ERROR = -3,
+
+	/* File does not exist. Returned from block_source_from_file(),  because
+	   it needs special handling in stack.
+	*/
+	REFTABLE_NOT_EXIST_ERROR = -4,
+
+	/* Trying to write out-of-date data. */
+	REFTABLE_LOCK_ERROR = -5,
+
+	/* Misuse of the API:
+	   - on writing a record with NULL refname.
+	   - on writing a reftable_ref_record outside the table limits
+	   - on writing a ref or log record before the stack's next_update_index
+	   - on writing a log record with multiline message with
+	   exact_log_message unset
+	   - on reading a reftable_ref_record from log iterator, or vice versa.
+	*/
+	REFTABLE_API_ERROR = -6,
+
+	/* Decompression error */
+	REFTABLE_ZLIB_ERROR = -7,
+
+	/* Wrote a table without blocks. */
+	REFTABLE_EMPTY_TABLE_ERROR = -8,
+
+	/* Dir/file conflict. */
+	REFTABLE_NAME_CONFLICT = -9,
+
+	/* Illegal ref name. */
+	REFTABLE_REFNAME_ERROR = -10,
+};
+
+/* convert the numeric error code to a string. The string should not be
+ * deallocated. */
+const char *reftable_error_str(int err);
+
+/*
+ * Convert the numeric error code to an equivalent errno code.
+ */
+int reftable_error_to_errno(int err);
+
+/****************************************************************
+ Writing
+
+ Writing single reftables
+ ****************************************************************/
+
+/* reftable_write_options sets options for writing a single reftable. */
+struct reftable_write_options {
+	/* boolean: do not pad out blocks to block size. */
+	int unpadded;
+
+	/* the blocksize. Should be less than 2^24. */
+	uint32_t block_size;
+
+	/* boolean: do not generate a SHA1 => ref index. */
+	int skip_index_objects;
+
+	/* how often to write complete keys in each block. */
+	int restart_interval;
+
+	/* 4-byte identifier ("sha1", "s256") of the hash.
+	 * Defaults to SHA1 if unset
+	 */
+	uint32_t hash_id;
+
+	/* boolean: do not check ref names for validity or dir/file conflicts.
+	 */
+	int skip_name_check;
+
+	/* boolean: copy log messages exactly. If unset, check that the message
+	 *   is a single line, and add '\n' if missing.
+	 */
+	int exact_log_message;
+};
+
+/* reftable_block_stats holds statistics for a single block type */
+struct reftable_block_stats {
+	/* total number of entries written */
+	int entries;
+	/* total number of key restarts */
+	int restarts;
+	/* total number of blocks */
+	int blocks;
+	/* total number of index blocks */
+	int index_blocks;
+	/* depth of the index */
+	int max_index_level;
+
+	/* offset of the first block for this type */
+	uint64_t offset;
+	/* offset of the top level index block for this type, or 0 if not
+	 * present */
+	uint64_t index_offset;
+};
+
+/* stats holds overall statistics for a single reftable */
+struct reftable_stats {
+	/* total number of blocks written. */
+	int blocks;
+	/* stats for ref data */
+	struct reftable_block_stats ref_stats;
+	/* stats for the SHA1 to ref map. */
+	struct reftable_block_stats obj_stats;
+	/* stats for index blocks */
+	struct reftable_block_stats idx_stats;
+	/* stats for log blocks */
+	struct reftable_block_stats log_stats;
+
+	/* disambiguation length of shortened object IDs. */
+	int object_id_len;
+};
+
+/* reftable_new_writer creates a new writer */
+struct reftable_writer *
+reftable_new_writer(int (*writer_func)(void *, const void *, size_t),
+		    void *writer_arg, struct reftable_write_options *opts);
+
+/* write to a file descriptor. fdp should be an int* pointing to the fd. */
+int reftable_fd_write(void *fdp, const void *data, size_t size);
+
+/* Set the range of update indices for the records we will add.  When
+   writing a table into a stack, the min should be at least
+   reftable_stack_next_update_index(), or REFTABLE_API_ERROR is returned.
+
+   For transactional updates, typically min==max. When converting an existing
+   ref database into a single reftable, this would be a range of update-index
+   timestamps.
+ */
+void reftable_writer_set_limits(struct reftable_writer *w, uint64_t min,
+				uint64_t max);
+
+/* adds a reftable_ref_record. Must be called in ascending
+   order. The update_index must be within the limits set by
+   reftable_writer_set_limits(), or REFTABLE_API_ERROR is returned.
+
+   It is an error to write a ref record after a log record.
+ */
+int reftable_writer_add_ref(struct reftable_writer *w,
+			    struct reftable_ref_record *ref);
+
+/* Convenience function to add multiple refs. Will sort the refs by
+   name before adding. */
+int reftable_writer_add_refs(struct reftable_writer *w,
+			     struct reftable_ref_record *refs, int n);
+
+/* adds a reftable_log_record. Must be called in ascending order (with more
+   recent log entries first.)
+ */
+int reftable_writer_add_log(struct reftable_writer *w,
+			    struct reftable_log_record *log);
+
+/* Convenience function to add multiple logs. Will sort the records by
+   key before adding. */
+int reftable_writer_add_logs(struct reftable_writer *w,
+			     struct reftable_log_record *logs, int n);
+
+/* reftable_writer_close finalizes the reftable. The writer is retained so
+ * statistics can be inspected. */
+int reftable_writer_close(struct reftable_writer *w);
+
+/* writer_stats returns the statistics on the reftable being written.
+
+   This struct becomes invalid when the writer is freed.
+ */
+const struct reftable_stats *writer_stats(struct reftable_writer *w);
+
+/* reftable_writer_free deallocates memory for the writer */
+void reftable_writer_free(struct reftable_writer *w);
+
+/****************************************************************
+ * ITERATING
+ ****************************************************************/
+
+/* iterator is the generic interface for walking over data stored in a
+   reftable. It is generally passed around by value.
+*/
+struct reftable_iterator {
+	struct reftable_iterator_vtable *ops;
+	void *iter_arg;
+};
+
+/* reads the next reftable_ref_record. Returns < 0 for error, 0 for OK and > 0:
+   end of iteration.
+*/
+int reftable_iterator_next_ref(struct reftable_iterator *it,
+			       struct reftable_ref_record *ref);
+
+/* reads the next reftable_log_record. Returns < 0 for error, 0 for OK and > 0:
+   end of iteration.
+*/
+int reftable_iterator_next_log(struct reftable_iterator *it,
+			       struct reftable_log_record *log);
+
+/* releases resources associated with an iterator. */
+void reftable_iterator_destroy(struct reftable_iterator *it);
+
+/****************************************************************
+ Reading single tables
+
+ The follow routines are for reading single files. For an application-level
+ interface, skip ahead to struct reftable_merged_table and struct
+ reftable_stack.
+ ****************************************************************/
+
+/* block_source is a generic wrapper for a seekable readable file.
+   It is generally passed around by value.
+ */
+struct reftable_block_source {
+	struct reftable_block_source_vtable *ops;
+	void *arg;
+};
+
+/* a contiguous segment of bytes. It keeps track of its generating block_source
+   so it can return itself into the pool.
+*/
+struct reftable_block {
+	uint8_t *data;
+	int len;
+	struct reftable_block_source source;
+};
+
+/* block_source_vtable are the operations that make up block_source */
+struct reftable_block_source_vtable {
+	/* returns the size of a block source */
+	uint64_t (*size)(void *source);
+
+	/* reads a segment from the block source. It is an error to read
+	   beyond the end of the block */
+	int (*read_block)(void *source, struct reftable_block *dest,
+			  uint64_t off, uint32_t size);
+	/* mark the block as read; may return the data back to malloc */
+	void (*return_block)(void *source, struct reftable_block *blockp);
+
+	/* release all resources associated with the block source */
+	void (*close)(void *source);
+};
+
+/* opens a file on the file system as a block_source */
+int reftable_block_source_from_file(struct reftable_block_source *block_src,
+				    const char *name);
+
+/* The reader struct is a handle to an open reftable file. */
+struct reftable_reader;
+
+/* reftable_new_reader opens a reftable for reading. If successful, returns 0
+ * code and sets pp. The name is used for creating a stack. Typically, it is the
+ * basename of the file. The block source `src` is owned by the reader, and is
+ * closed on calling reftable_reader_destroy().
+ */
+int reftable_new_reader(struct reftable_reader **pp,
+			struct reftable_block_source *src, const char *name);
+
+/* reftable_reader_seek_ref returns an iterator where 'name' would be inserted
+   in the table.  To seek to the start of the table, use name = "".
+
+   example:
+
+   struct reftable_reader *r = NULL;
+   int err = reftable_new_reader(&r, &src, "filename");
+   if (err < 0) { ... }
+   struct reftable_iterator it  = {0};
+   err = reftable_reader_seek_ref(r, &it, "refs/heads/master");
+   if (err < 0) { ... }
+   struct reftable_ref_record ref  = {0};
+   while (1) {
+     err = reftable_iterator_next_ref(&it, &ref);
+     if (err > 0) {
+       break;
+     }
+     if (err < 0) {
+       ..error handling..
+     }
+     ..found..
+   }
+   reftable_iterator_destroy(&it);
+   reftable_ref_record_clear(&ref);
+ */
+int reftable_reader_seek_ref(struct reftable_reader *r,
+			     struct reftable_iterator *it, const char *name);
+
+/* returns the hash ID used in this table. */
+uint32_t reftable_reader_hash_id(struct reftable_reader *r);
+
+/* seek to logs for the given name, older than update_index. To seek to the
+   start of the table, use name = "".
+ */
+int reftable_reader_seek_log_at(struct reftable_reader *r,
+				struct reftable_iterator *it, const char *name,
+				uint64_t update_index);
+
+/* seek to newest log entry for given name. */
+int reftable_reader_seek_log(struct reftable_reader *r,
+			     struct reftable_iterator *it, const char *name);
+
+/* closes and deallocates a reader. */
+void reftable_reader_free(struct reftable_reader *);
+
+/* return an iterator for the refs pointing to `oid`. */
+int reftable_reader_refs_for(struct reftable_reader *r,
+			     struct reftable_iterator *it, uint8_t *oid);
+
+/* return the max_update_index for a table */
+uint64_t reftable_reader_max_update_index(struct reftable_reader *r);
+
+/* return the min_update_index for a table */
+uint64_t reftable_reader_min_update_index(struct reftable_reader *r);
+
+/****************************************************************
+ Merged tables
+
+ A ref database kept in a sequence of table files. The merged_table presents a
+ unified view to reading (seeking, iterating) a sequence of immutable tables.
+ ****************************************************************/
+
+/* A merged table is implements seeking/iterating over a stack of tables. */
+struct reftable_merged_table;
+
+/* A generic reftable; see below. */
+struct reftable_table;
+
+/* reftable_new_merged_table creates a new merged table. It takes ownership of
+   the stack array.
+*/
+int reftable_new_merged_table(struct reftable_merged_table **dest,
+			      struct reftable_table *stack, int n,
+			      uint32_t hash_id);
+
+/* returns an iterator positioned just before 'name' */
+int reftable_merged_table_seek_ref(struct reftable_merged_table *mt,
+				   struct reftable_iterator *it,
+				   const char *name);
+
+/* returns an iterator for log entry, at given update_index */
+int reftable_merged_table_seek_log_at(struct reftable_merged_table *mt,
+				      struct reftable_iterator *it,
+				      const char *name, uint64_t update_index);
+
+/* like reftable_merged_table_seek_log_at but look for the newest entry. */
+int reftable_merged_table_seek_log(struct reftable_merged_table *mt,
+				   struct reftable_iterator *it,
+				   const char *name);
+
+/* returns the max update_index covered by this merged table. */
+uint64_t
+reftable_merged_table_max_update_index(struct reftable_merged_table *mt);
+
+/* returns the min update_index covered by this merged table. */
+uint64_t
+reftable_merged_table_min_update_index(struct reftable_merged_table *mt);
+
+/* releases memory for the merged_table */
+void reftable_merged_table_free(struct reftable_merged_table *m);
+
+/* return the hash ID of the merged table. */
+uint32_t reftable_merged_table_hash_id(struct reftable_merged_table *m);
+
+/****************************************************************
+ Generic tables
+
+ A unified API for reading tables, either merged tables, or single readers.
+ ****************************************************************/
+
+struct reftable_table {
+	struct reftable_table_vtable *ops;
+	void *table_arg;
+};
+
+int reftable_table_seek_ref(struct reftable_table *tab,
+			    struct reftable_iterator *it, const char *name);
+
+void reftable_table_from_reader(struct reftable_table *tab,
+				struct reftable_reader *reader);
+
+/* returns the hash ID from a generic reftable_table */
+uint32_t reftable_table_hash_id(struct reftable_table *tab);
+
+/* create a generic table from reftable_merged_table */
+void reftable_table_from_merged_table(struct reftable_table *tab,
+				      struct reftable_merged_table *table);
+
+/* returns the max update_index covered by this table. */
+uint64_t reftable_table_max_update_index(struct reftable_table *tab);
+
+/* returns the min update_index covered by this table. */
+uint64_t reftable_table_min_update_index(struct reftable_table *tab);
+
+/* convenience function to read a single ref. Returns < 0 for error, 0
+   for success, and 1 if ref not found. */
+int reftable_table_read_ref(struct reftable_table *tab, const char *name,
+			    struct reftable_ref_record *ref);
+
+/****************************************************************
+ Mutable ref database
+
+ The stack presents an interface to a mutable sequence of reftables.
+ ****************************************************************/
+
+/* a stack is a stack of reftables, which can be mutated by pushing a table to
+ * the top of the stack */
+struct reftable_stack;
+
+/* open a new reftable stack. The tables along with the table list will be
+   stored in 'dir'. Typically, this should be .git/reftables.
+*/
+int reftable_new_stack(struct reftable_stack **dest, const char *dir,
+		       struct reftable_write_options config);
+
+/* returns the update_index at which a next table should be written. */
+uint64_t reftable_stack_next_update_index(struct reftable_stack *st);
+
+/* holds a transaction to add tables at the top of a stack. */
+struct reftable_addition;
+
+/*
+  returns a new transaction to add reftables to the given stack. As a side
+  effect, the ref database is locked.
+*/
+int reftable_stack_new_addition(struct reftable_addition **dest,
+				struct reftable_stack *st);
+
+/* Adds a reftable to transaction. */
+int reftable_addition_add(struct reftable_addition *add,
+			  int (*write_table)(struct reftable_writer *wr,
+					     void *arg),
+			  void *arg);
+
+/* Commits the transaction, releasing the lock. */
+int reftable_addition_commit(struct reftable_addition *add);
+
+/* Release all non-committed data from the transaction, and deallocate the
+   transaction. Releases the lock if held. */
+void reftable_addition_destroy(struct reftable_addition *add);
+
+/* add a new table to the stack. The write_table function must call
+   reftable_writer_set_limits, add refs and return an error value. */
+int reftable_stack_add(struct reftable_stack *st,
+		       int (*write_table)(struct reftable_writer *wr,
+					  void *write_arg),
+		       void *write_arg);
+
+/* returns the merged_table for seeking. This table is valid until the
+   next write or reload, and should not be closed or deleted.
+*/
+struct reftable_merged_table *
+reftable_stack_merged_table(struct reftable_stack *st);
+
+/* frees all resources associated with the stack. */
+void reftable_stack_destroy(struct reftable_stack *st);
+
+/* Reloads the stack if necessary. This is very cheap to run if the stack was up
+ * to date */
+int reftable_stack_reload(struct reftable_stack *st);
+
+/* Policy for expiring reflog entries. */
+struct reftable_log_expiry_config {
+	/* Drop entries older than this timestamp */
+	uint64_t time;
+
+	/* Drop older entries */
+	uint64_t min_update_index;
+};
+
+/* compacts all reftables into a giant table. Expire reflog entries if config is
+ * non-NULL */
+int reftable_stack_compact_all(struct reftable_stack *st,
+			       struct reftable_log_expiry_config *config);
+
+/* heuristically compact unbalanced table stack. */
+int reftable_stack_auto_compact(struct reftable_stack *st);
+
+/* convenience function to read a single ref. Returns < 0 for error, 0
+   for success, and 1 if ref not found. */
+int reftable_stack_read_ref(struct reftable_stack *st, const char *refname,
+			    struct reftable_ref_record *ref);
+
+/* convenience function to read a single log. Returns < 0 for error, 0
+   for success, and 1 if ref not found. */
+int reftable_stack_read_log(struct reftable_stack *st, const char *refname,
+			    struct reftable_log_record *log);
+
+/* statistics on past compactions. */
+struct reftable_compaction_stats {
+	uint64_t bytes; /* total number of bytes written */
+	uint64_t entries_written; /* total number of entries written, including
+				     failures. */
+	int attempts; /* how often we tried to compact */
+	int failures; /* failures happen on concurrent updates */
+};
+
+/* return statistics for compaction up till now. */
+struct reftable_compaction_stats *
+reftable_stack_compaction_stats(struct reftable_stack *st);
+
+#endif
-- 
gitgitgadget
Previous: Jonathan NiederNext: Jonathan Nieder
Message 23 of 251 in “reftable library”
  1. 00/13 reftable libraryHan-Wen Nienhuys via GitGitGadget, Sep 16, 2020
  2. 01/13 reftable: add LICENSEHan-Wen Nienhuys via GitGitGadget, Sep 16, 2020
  3. 10/13 reftable: read reftable filesHan-Wen Nienhuys via GitGitGadget, Sep 16, 2020
  4. 12/13 reftable: rest of libraryHan-Wen Nienhuys via GitGitGadget, Sep 16, 2020
  5. 09/13 reftable: write reftable filesHan-Wen Nienhuys via GitGitGadget, Sep 16, 2020
  6. 13/13 reftable: "test-tool dump-reftable" command.Han-Wen Nienhuys via GitGitGadget, Sep 16, 2020
  7. 11/13 reftable: file level testsHan-Wen Nienhuys via GitGitGadget, Sep 16, 2020
  8. 08/13 reftable: a generic binary tree implementationHan-Wen Nienhuys via GitGitGadget, Sep 16, 2020
  9. 07/13 reftable: reading/writing blocksHan-Wen Nienhuys via GitGitGadget, Sep 16, 2020
  10. 05/13 reftable: utility functionsHan-Wen Nienhuys via GitGitGadget, Sep 16, 2020
  11. 06/13 reftable: (de)serialization for the polymorphic record type.Han-Wen Nienhuys via GitGitGadget, Sep 16, 2020
  12. Junio C HamanoSep 20, 2020
  13. Han-Wen NienhuysSep 21, 2020
  14. Jeff KingSep 24, 2020
  15. Jeff KingSep 24, 2020
  16. Junio C HamanoSep 24, 2020
  17. 04/13 reftable: add a barebones unittest frameworkHan-Wen Nienhuys via GitGitGadget, Sep 16, 2020
  18. 03/13 vcxproj: adjust for the reftable changesJohannes Schindelin via GitGitGadget, Sep 16, 2020
  19. 02/13 reftable: define the public APIHan-Wen Nienhuys via GitGitGadget, Sep 16, 2020
  20. 00/13 reftable libraryHan-Wen Nienhuys via GitGitGadget, Oct 1, 2020
  21. 01/13 reftable: add LICENSEHan-Wen Nienhuys via GitGitGadget, Oct 1, 2020
  22. Jonathan NiederOct 2, 2020
  23. 02/13 reftable: define the public APIHan-Wen Nienhuys via GitGitGadget, Oct 1, 2020
  24. Jonathan NiederOct 2, 2020
  25. Emily ShafferOct 9, 2020
  26. Han-Wen NienhuysOct 10, 2020
  27. Han-Wen NienhuysNov 30, 2020
  28. Han-Wen NienhuysOct 10, 2020
  29. Jonathan NiederOct 12, 2020
  30. Han-Wen NienhuysNov 30, 2020
  31. Jonathan TanOct 8, 2020
  32. Han-Wen NienhuysOct 10, 2020
  33. 04/13 reftable: add a barebones unittest frameworkHan-Wen Nienhuys via GitGitGadget, Oct 1, 2020
  34. Jonathan NiederOct 2, 2020
  35. Jonathan TanOct 8, 2020
  36. Josh SteadmonOct 8, 2020
  37. 03/13 vcxproj: adjust for the reftable changesJohannes Schindelin via GitGitGadget, Oct 1, 2020
  38. Jonathan NiederOct 2, 2020
  39. Johannes SchindelinOct 2, 2020
  40. 08/13 reftable: a generic binary tree implementationHan-Wen Nienhuys via GitGitGadget, Oct 1, 2020
  41. 07/13 reftable: reading/writing blocksHan-Wen Nienhuys via GitGitGadget, Oct 1, 2020
  42. 05/13 reftable: utility functionsHan-Wen Nienhuys via GitGitGadget, Oct 1, 2020
  43. Jonathan NiederOct 2, 2020
  44. Han-Wen NienhuysOct 10, 2020
  45. Jonathan NiederOct 12, 2020
  46. Patrick SteinhardtOct 12, 2020
  47. Jonathan NiederOct 12, 2020
  48. Johannes SchindelinOct 13, 2020
  49. Junio C HamanoOct 13, 2020
  50. Johannes SchindelinOct 15, 2020
  51. Junio C HamanoOct 15, 2020
  52. Johannes SchindelinOct 15, 2020
  53. Patrick SteinhardtOct 16, 2020
  54. Johannes SchindelinOct 2, 2020
  55. Junio C HamanoOct 2, 2020
  56. Johannes SchindelinOct 3, 2020
  57. Jonathan TanOct 8, 2020
  58. Han-Wen NienhuysOct 10, 2020
  59. Johannes SchindelinOct 11, 2020
  60. Jonathan NiederOct 12, 2020
  61. Johannes SchindelinOct 12, 2020
  62. Jonathan NiederOct 12, 2020
  63. Johannes SchindelinOct 12, 2020
  64. Junio C HamanoOct 12, 2020
  65. Johannes SchindelinOct 12, 2020
  66. Ævar Arnfjörð BjarmasonOct 23, 2020
  67. Junio C HamanoOct 23, 2020
  68. 11/13 reftable: file level testsHan-Wen Nienhuys via GitGitGadget, Oct 1, 2020
  69. 10/13 reftable: read reftable filesHan-Wen Nienhuys via GitGitGadget, Oct 1, 2020
  70. 09/13 reftable: write reftable filesHan-Wen Nienhuys via GitGitGadget, Oct 1, 2020
  71. 06/13 reftable: (de)serialization for the polymorphic record type.Han-Wen Nienhuys via GitGitGadget, Oct 1, 2020
  72. Junio C HamanoOct 1, 2020
  73. Ramsay JonesOct 1, 2020
  74. 13/13 reftable: "test-tool dump-reftable" command.Han-Wen Nienhuys via GitGitGadget, Oct 1, 2020
  75. 12/13 reftable: rest of libraryHan-Wen Nienhuys via GitGitGadget, Oct 1, 2020
  76. Johannes SchindelinOct 2, 2020
  77. Junio C HamanoOct 2, 2020
  78. Johannes SchindelinOct 4, 2020
  79. 00/16 reftable libraryHan-Wen Nienhuys via GitGitGadget, Nov 26, 2020
  80. 01/16 move sleep_millisec to git-compat-util.hHan-Wen Nienhuys via GitGitGadget, Nov 26, 2020
  81. 03/16 reftable: add LICENSEHan-Wen Nienhuys via GitGitGadget, Nov 26, 2020
  82. Ævar Arnfjörð BjarmasonNov 27, 2020
  83. Han-Wen NienhuysNov 30, 2020
  84. Han-Wen NienhuysNov 30, 2020
  85. Felipe ContrerasNov 30, 2020
  86. Han-Wen NienhuysDec 1, 2020
  87. Felipe ContrerasDec 1, 2020
  88. Ævar Arnfjörð BjarmasonDec 1, 2020
  89. Han-Wen NienhuysDec 1, 2020
  90. Felipe ContrerasDec 1, 2020
  91. Felipe ContrerasDec 1, 2020
  92. 04/16 reftable: add error related functionalityHan-Wen Nienhuys via GitGitGadget, Nov 26, 2020
  93. Felipe ContrerasNov 27, 2020
  94. Ævar Arnfjörð BjarmasonNov 27, 2020
  95. Han-Wen NienhuysNov 30, 2020
  96. 02/16 init-db: set the_repository->hash_algo early onHan-Wen Nienhuys via GitGitGadget, Nov 26, 2020
  97. Ævar Arnfjörð BjarmasonNov 27, 2020
  98. 06/16 reftable: add blocksource, an abstraction for random access readsHan-Wen Nienhuys via GitGitGadget, Nov 26, 2020
  99. 05/16 reftable: utility functionsHan-Wen Nienhuys via GitGitGadget, Nov 26, 2020
  100. Felipe ContrerasNov 27, 2020
  101. Ævar Arnfjörð BjarmasonNov 27, 2020
  102. 09/16 reftable: a generic binary tree implementationHan-Wen Nienhuys via GitGitGadget, Nov 26, 2020
  103. 08/16 reftable: reading/writing blocksHan-Wen Nienhuys via GitGitGadget, Nov 26, 2020
  104. 07/16 reftable: (de)serialization for the polymorphic record type.Han-Wen Nienhuys via GitGitGadget, Nov 26, 2020
  105. 10/16 reftable: write reftable filesHan-Wen Nienhuys via GitGitGadget, Nov 26, 2020
  106. 12/16 reftable: reftable file level testsHan-Wen Nienhuys via GitGitGadget, Nov 26, 2020
  107. 11/16 reftable: read reftable filesHan-Wen Nienhuys via GitGitGadget, Nov 26, 2020
  108. 15/16 git-prompt: prepare for reftable refs backendSZEDER Gábor via GitGitGadget, Nov 26, 2020
  109. 13/16 reftable: rest of libraryHan-Wen Nienhuys via GitGitGadget, Nov 26, 2020
  110. 16/16 Add "test-tool dump-reftable" command.Han-Wen Nienhuys via GitGitGadget, Nov 26, 2020
  111. 14/16 Reftable support for git-coreHan-Wen Nienhuys via GitGitGadget, Nov 26, 2020
  112. Ævar Arnfjörð BjarmasonNov 27, 2020
  113. 00/15 reftable libraryHan-Wen Nienhuys via GitGitGadget, Dec 9, 2020
  114. 03/15 reftable: add error related functionalityHan-Wen Nienhuys via GitGitGadget, Dec 9, 2020
  115. 02/15 reftable: add LICENSEHan-Wen Nienhuys via GitGitGadget, Dec 9, 2020
  116. 01/15 init-db: set the_repository->hash_algo early onHan-Wen Nienhuys via GitGitGadget, Dec 9, 2020
  117. 14/15 git-prompt: prepare for reftable refs backendSZEDER Gábor via GitGitGadget, Dec 9, 2020
  118. 11/15 reftable: reftable file level testsHan-Wen Nienhuys via GitGitGadget, Dec 9, 2020
  119. 13/15 Reftable support for git-coreHan-Wen Nienhuys via GitGitGadget, Dec 9, 2020
  120. Ævar Arnfjörð BjarmasonJan 21, 2021
  121. Han-Wen NienhuysJan 21, 2021
  122. Han-Wen NienhuysJan 21, 2021
  123. Ævar Arnfjörð BjarmasonJan 26, 2021
  124. Han-Wen NienhuysApr 23, 2021
  125. Ævar Arnfjörð BjarmasonApr 26, 2021
  126. Han-Wen NienhuysApr 26, 2021
  127. Ævar Arnfjörð BjarmasonApr 28, 2021
  128. Han-Wen NienhuysApr 28, 2021
  129. refs: introduce API function to write invalid null refStefan Beller, Feb 22, 2021
  130. Eric SunshineFeb 22, 2021
  131. Eric SunshineFeb 22, 2021
  132. Han-Wen NienhuysFeb 22, 2021
  133. 12/15 reftable: rest of libraryHan-Wen Nienhuys via GitGitGadget, Dec 9, 2020
  134. 05/15 reftable: add blocksource, an abstraction for random access readsHan-Wen Nienhuys via GitGitGadget, Dec 9, 2020
  135. 15/15 Add "test-tool dump-reftable" command.Han-Wen Nienhuys via GitGitGadget, Dec 9, 2020
  136. 04/15 reftable: utility functionsHan-Wen Nienhuys via GitGitGadget, Dec 9, 2020
  137. 10/15 reftable: read reftable filesHan-Wen Nienhuys via GitGitGadget, Dec 9, 2020
  138. 08/15 reftable: a generic binary tree implementationHan-Wen Nienhuys via GitGitGadget, Dec 9, 2020
  139. 06/15 reftable: (de)serialization for the polymorphic record type.Han-Wen Nienhuys via GitGitGadget, Dec 9, 2020
  140. 07/15 reftable: reading/writing blocksHan-Wen Nienhuys via GitGitGadget, Dec 9, 2020
  141. 09/15 reftable: write reftable filesHan-Wen Nienhuys via GitGitGadget, Dec 9, 2020
  142. 00/15 reftable libraryHan-Wen Nienhuys via GitGitGadget, Mar 12, 2021
  143. 03/15 reftable: add error related functionalityHan-Wen Nienhuys via GitGitGadget, Mar 12, 2021
  144. 02/15 reftable: add LICENSEHan-Wen Nienhuys via GitGitGadget, Mar 12, 2021
  145. 01/15 init-db: set the_repository->hash_algo early onHan-Wen Nienhuys via GitGitGadget, Mar 12, 2021
  146. 05/15 reftable: add blocksource, an abstraction for random access readsHan-Wen Nienhuys via GitGitGadget, Mar 12, 2021
  147. 08/15 reftable: a generic binary tree implementationHan-Wen Nienhuys via GitGitGadget, Mar 12, 2021
  148. 04/15 reftable: utility functionsHan-Wen Nienhuys via GitGitGadget, Mar 12, 2021
  149. 09/15 reftable: write reftable filesHan-Wen Nienhuys via GitGitGadget, Mar 12, 2021
  150. 06/15 reftable: (de)serialization for the polymorphic record type.Han-Wen Nienhuys via GitGitGadget, Mar 12, 2021
  151. 07/15 reftable: reading/writing blocksHan-Wen Nienhuys via GitGitGadget, Mar 12, 2021
  152. 11/15 reftable: reftable file level testsHan-Wen Nienhuys via GitGitGadget, Mar 12, 2021
  153. 15/15 Add "test-tool dump-reftable" command.Han-Wen Nienhuys via GitGitGadget, Mar 12, 2021
  154. 14/15 git-prompt: prepare for reftable refs backendSZEDER Gábor via GitGitGadget, Mar 12, 2021
  155. 13/15 Reftable support for git-coreHan-Wen Nienhuys via GitGitGadget, Mar 12, 2021
  156. Derrick StoleeMar 23, 2021
  157. Ævar Arnfjörð BjarmasonMar 23, 2021
  158. Junio C HamanoMar 23, 2021
  159. Junio C HamanoMar 23, 2021
  160. 10/15 reftable: read reftable filesHan-Wen Nienhuys via GitGitGadget, Mar 12, 2021
  161. 12/15 reftable: rest of libraryHan-Wen Nienhuys via GitGitGadget, Mar 12, 2021
  162. 00/20 reftable libraryHan-Wen Nienhuys via GitGitGadget, Apr 12, 2021
  163. 01/20 init-db: set the_repository->hash_algo early onHan-Wen Nienhuys via GitGitGadget, Apr 12, 2021
  164. 02/20 reftable: add LICENSEHan-Wen Nienhuys via GitGitGadget, Apr 12, 2021
  165. Ævar Arnfjörð BjarmasonApr 13, 2021
  166. Han-Wen NienhuysApr 13, 2021
  167. Ævar Arnfjörð BjarmasonApr 13, 2021
  168. 03/20 reftable: add error related functionalityHan-Wen Nienhuys via GitGitGadget, Apr 12, 2021
  169. 04/20 reftable: utility functionsHan-Wen Nienhuys via GitGitGadget, Apr 12, 2021
  170. Ævar Arnfjörð BjarmasonApr 13, 2021
  171. Han-Wen NienhuysApr 13, 2021
  172. Ævar Arnfjörð BjarmasonApr 13, 2021
  173. Ævar Arnfjörð BjarmasonApr 13, 2021
  174. Han-Wen NienhuysApr 15, 2021
  175. 05/20 reftable: add blocksource, an abstraction for random access readsHan-Wen Nienhuys via GitGitGadget, Apr 12, 2021
  176. 06/20 reftable: (de)serialization for the polymorphic record type.Han-Wen Nienhuys via GitGitGadget, Apr 12, 2021
  177. 07/20 reftable: reading/writing blocksHan-Wen Nienhuys via GitGitGadget, Apr 12, 2021
  178. Junio C HamanoApr 12, 2021
  179. Ævar Arnfjörð BjarmasonApr 13, 2021
  180. Han-Wen NienhuysApr 15, 2021
  181. 08/20 reftable: a generic binary tree implementationHan-Wen Nienhuys via GitGitGadget, Apr 12, 2021
  182. 10/20 reftable: generic interface to tablesHan-Wen Nienhuys via GitGitGadget, Apr 12, 2021
  183. 09/20 reftable: write reftable filesHan-Wen Nienhuys via GitGitGadget, Apr 12, 2021
  184. 11/20 reftable: read reftable filesHan-Wen Nienhuys via GitGitGadget, Apr 12, 2021
  185. 12/20 reftable: reftable file level testsHan-Wen Nienhuys via GitGitGadget, Apr 12, 2021
  186. 13/20 reftable: add a heap-based priority queue for reftable recordsHan-Wen Nienhuys via GitGitGadget, Apr 12, 2021
  187. 14/20 reftable: add merged table viewHan-Wen Nienhuys via GitGitGadget, Apr 12, 2021
  188. 17/20 reftable: add dump utilityHan-Wen Nienhuys via GitGitGadget, Apr 12, 2021
  189. 15/20 reftable: implement refname validationHan-Wen Nienhuys via GitGitGadget, Apr 12, 2021
  190. 16/20 reftable: implement stack, a mutable database of reftable files.Han-Wen Nienhuys via GitGitGadget, Apr 12, 2021
  191. 18/20 Reftable support for git-coreHan-Wen Nienhuys via GitGitGadget, Apr 12, 2021
  192. Ævar Arnfjörð BjarmasonApr 13, 2021
  193. Han-Wen NienhuysApr 14, 2021
  194. Ævar Arnfjörð BjarmasonApr 16, 2021
  195. Junio C HamanoApr 16, 2021
  196. 19/20 git-prompt: prepare for reftable refs backendSZEDER Gábor via GitGitGadget, Apr 12, 2021
  197. 20/20 Add "test-tool dump-reftable" command.Han-Wen Nienhuys via GitGitGadget, Apr 12, 2021
  198. 00/28 reftable libraryHan-Wen Nienhuys via GitGitGadget, Apr 19, 2021
  199. 01/28 refs: ref_iterator_peel returns boolean, rather than peel_statusHan-Wen Nienhuys via GitGitGadget, Apr 19, 2021
  200. Junio C HamanoApr 20, 2021
  201. Han-Wen NienhuysApr 21, 2021
  202. Junio C HamanoApr 21, 2021
  203. 03/28 refs/debug: trace into reflog expiry tooHan-Wen Nienhuys via GitGitGadget, Apr 19, 2021
  204. Junio C HamanoApr 20, 2021
  205. Han-Wen NienhuysApr 22, 2021
  206. 02/28 refs: document reflog_expire_fn's flag argumentHan-Wen Nienhuys via GitGitGadget, Apr 19, 2021
  207. Junio C HamanoApr 20, 2021
  208. Han-Wen NienhuysApr 27, 2021
  209. 04/28 hash.h: provide constants for the hash IDsHan-Wen Nienhuys via GitGitGadget, Apr 19, 2021
  210. Junio C HamanoApr 20, 2021
  211. brian m. carlsonApr 21, 2021
  212. Han-Wen NienhuysApr 21, 2021
  213. Han-Wen NienhuysJul 22, 2021
  214. 05/28 init-db: set the_repository->hash_algo early onHan-Wen Nienhuys via GitGitGadget, Apr 19, 2021
  215. 06/28 reftable: add LICENSEHan-Wen Nienhuys via GitGitGadget, Apr 19, 2021
  216. Ævar Arnfjörð BjarmasonApr 21, 2021
  217. Han-Wen NienhuysApr 21, 2021
  218. 08/28 reftable: utility functionsHan-Wen Nienhuys via GitGitGadget, Apr 19, 2021
  219. 09/28 reftable: add blocksource, an abstraction for random access readsHan-Wen Nienhuys via GitGitGadget, Apr 19, 2021
  220. 11/28 Provide zlib's uncompress2 from compat/zlib-compat.cHan-Wen Nienhuys via GitGitGadget, Apr 19, 2021
  221. 07/28 reftable: add error related functionalityHan-Wen Nienhuys via GitGitGadget, Apr 19, 2021
  222. 10/28 reftable: (de)serialization for the polymorphic record type.Han-Wen Nienhuys via GitGitGadget, Apr 19, 2021
  223. Andrzej HuntMay 4, 2021
  224. Han-Wen NienhuysMay 18, 2021
  225. 12/28 reftable: reading/writing blocksHan-Wen Nienhuys via GitGitGadget, Apr 19, 2021
  226. 17/28 reftable: reftable file level testsHan-Wen Nienhuys via GitGitGadget, Apr 19, 2021
  227. 16/28 reftable: read reftable filesHan-Wen Nienhuys via GitGitGadget, Apr 19, 2021
  228. 15/28 reftable: generic interface to tablesHan-Wen Nienhuys via GitGitGadget, Apr 19, 2021
  229. 14/28 reftable: write reftable filesHan-Wen Nienhuys via GitGitGadget, Apr 19, 2021
  230. 13/28 reftable: a generic binary tree implementationHan-Wen Nienhuys via GitGitGadget, Apr 19, 2021
  231. 21/28 reftable: implement stack, a mutable database of reftable files.Han-Wen Nienhuys via GitGitGadget, Apr 19, 2021
  232. 20/28 reftable: implement refname validationHan-Wen Nienhuys via GitGitGadget, Apr 19, 2021
  233. 19/28 reftable: add merged table viewHan-Wen Nienhuys via GitGitGadget, Apr 19, 2021
  234. 18/28 reftable: add a heap-based priority queue for reftable recordsHan-Wen Nienhuys via GitGitGadget, Apr 19, 2021
  235. 23/28 Reftable support for git-coreHan-Wen Nienhuys via GitGitGadget, Apr 19, 2021
  236. Junio C HamanoApr 20, 2021
  237. Han-Wen NienhuysApr 21, 2021
  238. Junio C HamanoApr 21, 2021
  239. Andrzej HuntMay 4, 2021
  240. Han-Wen NienhuysMay 18, 2021
  241. Han-Wen NienhuysMay 18, 2021
  242. 22/28 reftable: add dump utilityHan-Wen Nienhuys via GitGitGadget, Apr 19, 2021
  243. 26/28 t1301: document what needs to be done for REFTABLEHan-Wen Nienhuys via GitGitGadget, Apr 19, 2021
  244. 25/28 Add "test-tool dump-reftable" command.Han-Wen Nienhuys via GitGitGadget, Apr 19, 2021
  245. 24/28 git-prompt: prepare for reftable refs backendSZEDER Gábor via GitGitGadget, Apr 19, 2021
  246. 28/28 t1404: annotate test cases with REFFILESHan-Wen Nienhuys via GitGitGadget, Apr 19, 2021
  247. 27/28 t1401,t2011: parameterize HEAD.lock for REFTABLEHan-Wen Nienhuys via GitGitGadget, Apr 19, 2021
  248. Ævar Arnfjörð BjarmasonApr 21, 2021
  249. Han-Wen NienhuysApr 21, 2021
  250. Ævar Arnfjörð BjarmasonApr 21, 2021
  251. Han-Wen NienhuysApr 26, 2021

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.