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

[PATCH v3 08/17] odb: get rid of `the_repository` when handling alternates

From
Patrick Steinhardt <ps@pks.im>
Date
May 14, 2025, 05:12 UTC
Message-ID
<20250514-pks-object-store-wo-the-repository-v3-8-47df1d4ead22@pks.im>
In-Reply-To
<20250514-pks-object-store-wo-the-repository-v3-0-47df1d4ead22@pks.im>

The functions to manage alternates all depend on `the_repository`. Refactor them to accept an object database as parameter and adjusting all callers. The functions are renamed accordingly.

Note that right now the situation is still somewhat weird because we end up using the path provided by the object store's repository anyway. This will be adapted over time though so that we instead store the path to the primary object directory in the object database itself.

Signed-off-by: Patrick Steinhardt <ps@pks.im>
---
 builtin/clone.c           | 10 +++++----
 builtin/fsck.c            |  6 +++---
 builtin/grep.c            |  2 +-
 builtin/repack.c          |  3 ++-
 commit-graph.c            |  4 ++--
 loose.c                   |  2 +-
 object-file.c             | 10 ++++-----
 object-name.c             |  2 +-
 odb.c                     | 44 ++++++++++++++++++---------------------
 odb.h                     | 53 ++++++++++++++++++++++++++++++++---------------
 packfile.c                |  4 ++--
 submodule.c               |  3 ++-
 t/helper/test-ref-store.c |  2 +-
 tmp-objdir.c              |  2 +-
 14 files changed, 83 insertions(+), 64 deletions(-)
diff --git a/builtin/clone.c b/builtin/clone.c
index 1eafeefb48d..3aabdf6570b 100644
--- a/builtin/clone.c
+++ b/builtin/clone.c
@@ -171,7 +171,7 @@ static int add_one_reference(struct string_list_item *item, void *cb_data)
 	} else {
 		struct strbuf sb = STRBUF_INIT;
 		strbuf_addf(&sb, "%s/objects", ref_git);
-		add_to_alternates_file(sb.buf);
+		odb_add_to_alternates_file(the_repository->objects, sb.buf);
 		strbuf_release(&sb);
 	}
 
@@ -212,12 +212,14 @@ static void copy_alternates(struct strbuf *src, const char *src_repo)
 		if (!line.len || line.buf[0] == '#')
 			continue;
 		if (is_absolute_path(line.buf)) {
-			add_to_alternates_file(line.buf);
+			odb_add_to_alternates_file(the_repository->objects,
+						   line.buf);
 			continue;
 		}
 		abs_path = mkpathdup("%s/objects/%s", src_repo, line.buf);
 		if (!normalize_path_copy(abs_path, abs_path))
-			add_to_alternates_file(abs_path);
+			odb_add_to_alternates_file(the_repository->objects,
+						   abs_path);
 		else
 			warning("skipping invalid relative alternate: %s/%s",
 				src_repo, line.buf);
@@ -352,7 +354,7 @@ static void clone_local(const char *src_repo, const char *dest_repo)
 		struct strbuf alt = STRBUF_INIT;
 		get_common_dir(&alt, src_repo);
 		strbuf_addstr(&alt, "/objects");
-		add_to_alternates_file(alt.buf);
+		odb_add_to_alternates_file(the_repository->objects, alt.buf);
 		strbuf_release(&alt);
 	} else {
 		struct strbuf src = STRBUF_INIT;
diff --git a/builtin/fsck.c b/builtin/fsck.c
index 6a5181393a2..b961c2caa22 100644
--- a/builtin/fsck.c
+++ b/builtin/fsck.c
@@ -1006,7 +1006,7 @@ int cmd_fsck(int argc,
 		for_each_packed_object(the_repository,
 				       mark_packed_for_connectivity, NULL, 0);
 	} else {
-		prepare_alt_odb(the_repository);
+		odb_prepare_alternates(the_repository->objects);
 		for (alternate = the_repository->objects->alternates; alternate; alternate = alternate->next)
 			fsck_object_dir(alternate->path);
 
@@ -1117,7 +1117,7 @@ int cmd_fsck(int argc,
 	if (the_repository->settings.core_commit_graph) {
 		struct child_process commit_graph_verify = CHILD_PROCESS_INIT;
 
-		prepare_alt_odb(the_repository);
+		odb_prepare_alternates(the_repository->objects);
 		for (alternate = the_repository->objects->alternates; alternate; alternate = alternate->next) {
 			child_process_init(&commit_graph_verify);
 			commit_graph_verify.git_cmd = 1;
@@ -1135,7 +1135,7 @@ int cmd_fsck(int argc,
 	if (the_repository->settings.core_multi_pack_index) {
 		struct child_process midx_verify = CHILD_PROCESS_INIT;
 
-		prepare_alt_odb(the_repository);
+		odb_prepare_alternates(the_repository->objects);
 		for (alternate = the_repository->objects->alternates; alternate; alternate = alternate->next) {
 			child_process_init(&midx_verify);
 			midx_verify.git_cmd = 1;
diff --git a/builtin/grep.c b/builtin/grep.c
index 3858df2a82e..b19fee20425 100644
--- a/builtin/grep.c
+++ b/builtin/grep.c
@@ -462,7 +462,7 @@ static int grep_submodule(struct grep_opt *opt,
 
 	/*
 	 * NEEDSWORK: repo_read_gitmodules() might call
-	 * add_to_alternates_memory() via config_from_gitmodules(). This
+	 * odb_add_to_alternates_memory() via config_from_gitmodules(). This
 	 * operation causes a race condition with concurrent object readings
 	 * performed by the worker threads. That's why we need obj_read_lock()
 	 * here. It should be removed once it's no longer necessary to add the
diff --git a/builtin/repack.c b/builtin/repack.c
index 16782320058..8145474cf8d 100644
--- a/builtin/repack.c
+++ b/builtin/repack.c
@@ -1256,7 +1256,8 @@ int cmd_repack(int argc,
 	if (write_bitmaps && !(pack_everything & ALL_INTO_ONE) && !write_midx)
 		die(_(incremental_bitmap_conflict_error));
 
-	if (write_bitmaps && po_args.local && has_alt_odb(the_repository)) {
+	if (write_bitmaps && po_args.local &&
+	    odb_has_alternates(the_repository->objects)) {
 		/*
 		 * When asked to do a local repack, but we have
 		 * packfiles that are inherited from an alternate, then
diff --git a/commit-graph.c b/commit-graph.c
index 4848198d7bf..cd34b71d270 100644
--- a/commit-graph.c
+++ b/commit-graph.c
@@ -649,7 +649,7 @@ struct commit_graph *load_commit_graph_chain_fd_st(struct repository *r,
 	count = st->st_size / (the_hash_algo->hexsz + 1);
 	CALLOC_ARRAY(oids, count);
 
-	prepare_alt_odb(r);
+	odb_prepare_alternates(r->objects);
 
 	for (i = 0; i < count; i++) {
 		struct odb_alternate *alternate;
@@ -778,7 +778,7 @@ static int prepare_commit_graph(struct repository *r)
 	if (!commit_graph_compatible(r))
 		return 0;
 
-	prepare_alt_odb(r);
+	odb_prepare_alternates(r->objects);
 	for (alternate = r->objects->alternates;
 	     !r->objects->commit_graph && alternate;
 	     alternate = alternate->next)
diff --git a/loose.c b/loose.c
index 9febd1f3e9a..9fbf2336822 100644
--- a/loose.c
+++ b/loose.c
@@ -112,7 +112,7 @@ int repo_read_loose_object_map(struct repository *repo)
 	if (!should_use_loose_object_map(repo))
 		return 0;
 
-	prepare_alt_odb(repo);
+	odb_prepare_alternates(repo->objects);
 
 	for (alternate = repo->objects->alternates; alternate; alternate = alternate->next) {
 		if (load_one_loose_object_map(repo, alternate) < 0) {
diff --git a/object-file.c b/object-file.c
index dabc238447a..9e8649135ce 100644
--- a/object-file.c
+++ b/object-file.c
@@ -106,7 +106,7 @@ static int check_and_freshen_nonlocal(const struct object_id *oid, int freshen)
 {
 	struct odb_alternate *alternate;
 
-	prepare_alt_odb(the_repository);
+	odb_prepare_alternates(the_repository->objects);
 	for (alternate = the_repository->objects->alternates->next; alternate; alternate = alternate->next) {
 		if (check_and_freshen_odb(alternate, oid, freshen))
 			return 1;
@@ -211,7 +211,7 @@ static int stat_loose_object(struct repository *r, const struct object_id *oid,
 	struct odb_alternate *alternate;
 	static struct strbuf buf = STRBUF_INIT;
 
-	prepare_alt_odb(r);
+	odb_prepare_alternates(r->objects);
 	for (alternate = r->objects->alternates; alternate; alternate = alternate->next) {
 		*path = odb_loose_path(alternate, &buf, oid);
 		if (!lstat(*path, st))
@@ -233,7 +233,7 @@ static int open_loose_object(struct repository *r,
 	int most_interesting_errno = ENOENT;
 	static struct strbuf buf = STRBUF_INIT;
 
-	prepare_alt_odb(r);
+	odb_prepare_alternates(r->objects);
 	for (alternate = r->objects->alternates; alternate; alternate = alternate->next) {
 		*path = odb_loose_path(alternate, &buf, oid);
 		fd = git_open(*path);
@@ -252,7 +252,7 @@ static int quick_has_loose(struct repository *r,
 {
 	struct odb_alternate *alternate;
 
-	prepare_alt_odb(r);
+	odb_prepare_alternates(r->objects);
 	for (alternate = r->objects->alternates; alternate; alternate = alternate->next) {
 		if (oidtree_contains(odb_loose_cache(alternate, oid), oid))
 			return 1;
@@ -1542,7 +1542,7 @@ int for_each_loose_object(each_loose_object_fn cb, void *data,
 {
 	struct odb_alternate *alternate;
 
-	prepare_alt_odb(the_repository);
+	odb_prepare_alternates(the_repository->objects);
 	for (alternate = the_repository->objects->alternates; alternate; alternate = alternate->next) {
 		int r = for_each_loose_file_in_objdir(alternate->path, cb, NULL,
 						      NULL, data);
diff --git a/object-name.c b/object-name.c
index b83ba882b9e..2b757eb7948 100644
--- a/object-name.c
+++ b/object-name.c
@@ -376,7 +376,7 @@ static int init_object_disambiguation(struct repository *r,
 	ds->hex_pfx[len] = '\0';
 	ds->repo = r;
 	ds->bin_pfx.algo = algo ? hash_algo_by_ptr(algo) : GIT_HASH_UNKNOWN;
-	prepare_alt_odb(r);
+	odb_prepare_alternates(r->objects);
 	return 0;
 }
 
diff --git a/odb.c b/odb.c
index 7ff614fb0c7..bd601471cd7 100644
--- a/odb.c
+++ b/odb.c
@@ -272,10 +272,11 @@ static void read_info_alternates(struct object_database *odb,
 	free(path);
 }
 
-void add_to_alternates_file(const char *reference)
+void odb_add_to_alternates_file(struct object_database *odb,
+				const char *reference)
 {
 	struct lock_file lock = LOCK_INIT;
-	char *alts = repo_git_path(the_repository, "objects/info/alternates");
+	char *alts = repo_git_path(odb->repo, "objects/info/alternates");
 	FILE *in, *out;
 	int found = 0;
 
@@ -308,22 +309,23 @@ void add_to_alternates_file(const char *reference)
 		fprintf_or_die(out, "%s\n", reference);
 		if (commit_lock_file(&lock))
 			die_errno(_("unable to move new alternates file into place"));
-		if (the_repository->objects->loaded_alternates)
-			link_alt_odb_entries(the_repository->objects, reference,
+		if (odb->loaded_alternates)
+			link_alt_odb_entries(odb, reference,
 					     '\n', NULL, 0);
 	}
 	free(alts);
 }
 
-void add_to_alternates_memory(const char *reference)
+void odb_add_to_alternates_memory(struct object_database *odb,
+				  const char *reference)
 {
 	/*
 	 * Make sure alternates are initialized, or else our entry may be
 	 * overwritten when they are.
 	 */
-	prepare_alt_odb(the_repository);
+	odb_prepare_alternates(odb);
 
-	link_alt_odb_entries(the_repository->objects, reference,
+	link_alt_odb_entries(odb, reference,
 			     '\n', NULL, 0);
 }
 
@@ -335,7 +337,7 @@ struct odb_alternate *set_temporary_primary_odb(const char *dir, int will_destro
 	 * Make sure alternates are initialized, or else our entry may be
 	 * overwritten when they are.
 	 */
-	prepare_alt_odb(the_repository);
+	odb_prepare_alternates(the_repository->objects);
 
 	/*
 	 * Make a new primary odb and link the old primary ODB in as an
@@ -379,12 +381,6 @@ void restore_primary_odb(struct odb_alternate *restore_alt, const char *old_path
 	free_object_directory(cur_alt);
 }
 
-/*
- * Compute the exact path an alternate is at and returns it. In case of
- * error NULL is returned and the human readable error is added to `err`
- * `path` may be relative and should point to $GIT_DIR.
- * `err` must not be null.
- */
 char *compute_alternate_path(const char *path, struct strbuf *err)
 {
 	char *ref_git = NULL;
@@ -455,7 +451,7 @@ struct odb_alternate *odb_find_alternate(struct object_database *odb, const char
 	char *obj_dir_real = real_pathdup(obj_dir, 1);
 	struct strbuf odb_path_real = STRBUF_INIT;
 
-	prepare_alt_odb(odb->repo);
+	odb_prepare_alternates(odb);
 	for (alternate = odb->alternates; alternate; alternate = alternate->next) {
 		strbuf_realpath(&odb_path_real, alternate->path, 1);
 		if (!strcmp(obj_dir_real, odb_path_real.buf))
@@ -573,7 +569,7 @@ int foreach_alt_odb(alt_odb_fn fn, void *cb)
 	struct odb_alternate *alternate;
 	int r = 0;
 
-	prepare_alt_odb(the_repository);
+	odb_prepare_alternates(the_repository->objects);
 	for (alternate = the_repository->objects->alternates->next; alternate; alternate = alternate->next) {
 		r = fn(alternate, cb);
 		if (r)
@@ -582,21 +578,21 @@ int foreach_alt_odb(alt_odb_fn fn, void *cb)
 	return r;
 }
 
-void prepare_alt_odb(struct repository *r)
+void odb_prepare_alternates(struct object_database *odb)
 {
-	if (r->objects->loaded_alternates)
+	if (odb->loaded_alternates)
 		return;
 
-	link_alt_odb_entries(r->objects, r->objects->alternate_db, PATH_SEP, NULL, 0);
+	link_alt_odb_entries(odb, odb->alternate_db, PATH_SEP, NULL, 0);
 
-	read_info_alternates(r->objects, r->objects->alternates->path, 0);
-	r->objects->loaded_alternates = 1;
+	read_info_alternates(odb, odb->alternates->path, 0);
+	odb->loaded_alternates = 1;
 }
 
-int has_alt_odb(struct repository *r)
+int odb_has_alternates(struct object_database *odb)
 {
-	prepare_alt_odb(r);
-	return !!r->objects->alternates->next;
+	odb_prepare_alternates(odb);
+	return !!odb->alternates->next;
 }
 
 int obj_read_use_lock = 0;
diff --git a/odb.h b/odb.h
index eb46eb60edd..7ff3e54c061 100644
--- a/odb.h
+++ b/odb.h
@@ -12,6 +12,14 @@ struct oidtree;
 struct strbuf;
 struct repository;
 
+/*
+ * Compute the exact path an alternate is at and returns it. In case of
+ * error NULL is returned and the human readable error is added to `err`
+ * `path` may be relative and should point to $GIT_DIR.
+ * `err` must not be null.
+ */
+char *compute_alternate_path(const char *path, struct strbuf *err);
+
 /*
  * The alternate is the part of the object database that stores the actual
  * objects. It thus encapsulates the logic to read and write the specific
@@ -58,27 +66,11 @@ struct odb_alternate {
 	char *path;
 };
 
-void prepare_alt_odb(struct repository *r);
-int has_alt_odb(struct repository *r);
-char *compute_alternate_path(const char *path, struct strbuf *err);
 typedef int alt_odb_fn(struct odb_alternate *, void *);
 int foreach_alt_odb(alt_odb_fn, void*);
 typedef void alternate_ref_fn(const struct object_id *oid, void *);
 void for_each_alternate_ref(alternate_ref_fn, void *);
 
-/*
- * Add the directory to the on-disk alternates file; the new entry will also
- * take effect in the current process.
- */
-void add_to_alternates_file(const char *dir);
-
-/*
- * Add the directory to the in-memory list of alternates (along with any
- * recursive alternates it points to), but do not modify the on-disk alternates
- * file.
- */
-void add_to_alternates_memory(const char *dir);
-
 /*
  * Replace the current writable object directory with the specified temporary
  * object directory; returns the former primary object directory.
@@ -117,7 +109,7 @@ struct object_database {
 	/*
 	 * A list of alternate object directories loaded from the environment;
 	 * this should not generally need to be accessed directly, but will
-	 * populate the "alternates" list when prepare_alt_odb() is run.
+	 * populate the "alternates" list when odb_prepare_alternates() is run.
 	 */
 	char *alternate_db;
 
@@ -202,6 +194,33 @@ struct odb_alternate *odb_find_alternate(struct object_database *odb, const char
 int odb_mkstemp(struct object_database *odb,
 		struct strbuf *temp_filename, const char *pattern);
 
+/*
+ * Prepare alternate object backends for the given database by reading
+ * "objects/info/alternates" and opening the respective alternates.
+ */
+void odb_prepare_alternates(struct object_database *odb);
+
+/*
+ * Check whether the object database has any alternates. The primary object
+ * backend does not count as alternate.
+ */
+int odb_has_alternates(struct object_database *odb);
+
+/*
+ * Add the directory to the on-disk alternates file; the new entry will also
+ * take effect in the current process.
+ */
+void odb_add_to_alternates_file(struct object_database *odb,
+				const char *dir);
+
+/*
+ * Add the directory to the in-memory list of alternates (along with any
+ * recursive alternates it points to), but do not modify the on-disk alternates
+ * file.
+ */
+void odb_add_to_alternates_memory(struct object_database *odb,
+				  const char *dir);
+
 void *repo_read_object_file(struct repository *r,
 			    const struct object_id *oid,
 			    enum object_type *type,
diff --git a/packfile.c b/packfile.c
index 8133948b58f..ab9628eb3d4 100644
--- a/packfile.c
+++ b/packfile.c
@@ -1023,7 +1023,7 @@ static void prepare_packed_git(struct repository *r)
 	if (r->objects->packed_git_initialized)
 		return;
 
-	prepare_alt_odb(r);
+	odb_prepare_alternates(r->objects);
 	for (alternate = r->objects->alternates; alternate; alternate = alternate->next) {
 		int local = (alternate == r->objects->alternates);
 		prepare_multi_pack_index_one(r, alternate->path, local);
@@ -1048,7 +1048,7 @@ void reprepare_packed_git(struct repository *r)
 	 * the lifetime of the process.
 	 */
 	r->objects->loaded_alternates = 0;
-	prepare_alt_odb(r);
+	odb_prepare_alternates(r->objects);
 
 	for (alternate = r->objects->alternates; alternate; alternate = alternate->next)
 		odb_clear_loose_cache(alternate);
diff --git a/submodule.c b/submodule.c
index 9b1018877df..386be234230 100644
--- a/submodule.c
+++ b/submodule.c
@@ -189,7 +189,8 @@ int register_all_submodule_odb_as_alternates(void)
 	int ret = added_submodule_odb_paths.nr;
 
 	for (i = 0; i < added_submodule_odb_paths.nr; i++)
-		add_to_alternates_memory(added_submodule_odb_paths.items[i].string);
+		odb_add_to_alternates_memory(the_repository->objects,
+					     added_submodule_odb_paths.items[i].string);
 	if (ret) {
 		string_list_clear(&added_submodule_odb_paths, 0);
 		trace2_data_intmax("submodule", the_repository,
diff --git a/t/helper/test-ref-store.c b/t/helper/test-ref-store.c
index 2920ca59d72..8d9a271845c 100644
--- a/t/helper/test-ref-store.c
+++ b/t/helper/test-ref-store.c
@@ -79,7 +79,7 @@ static const char **get_store(const char **argv, struct ref_store **refs)
 		if (!repo_submodule_path_append(the_repository,
 						&sb, gitdir, "objects/"))
 			die("computing submodule path failed");
-		add_to_alternates_memory(sb.buf);
+		odb_add_to_alternates_memory(the_repository->objects, sb.buf);
 		strbuf_release(&sb);
 
 		*refs = repo_get_submodule_ref_store(the_repository, gitdir);
diff --git a/tmp-objdir.c b/tmp-objdir.c
index 9e05fcbddd0..cbb50438d16 100644
--- a/tmp-objdir.c
+++ b/tmp-objdir.c
@@ -304,7 +304,7 @@ const char **tmp_objdir_env(const struct tmp_objdir *t)
 
 void tmp_objdir_add_as_alternate(const struct tmp_objdir *t)
 {
-	add_to_alternates_memory(t->path.buf);
+	odb_add_to_alternates_memory(t->repo->objects, t->path.buf);
 }
 
 void tmp_objdir_replace_primary_odb(struct tmp_objdir *t, int will_destroy)
-- 
2.49.0.1141.g47af616452.dirty
Previous: Patrick SteinhardtNext: Patrick Steinhardt
Message 86 of 143 in “object-store: carve out the object database subsystem”
  1. 00/17 object-store: carve out the object database subsystemPatrick Steinhardt, May 6, 2025
  2. 01/17 object-store: rename `raw_object_store` to `object_database`Patrick Steinhardt, May 6, 2025
  3. Derrick StoleeMay 7, 2025
  4. Junio C HamanoMay 7, 2025
  5. 02/17 object-store: rename `object_directory` to `odb_backend`Patrick Steinhardt, May 6, 2025
  6. Derrick StoleeMay 7, 2025
  7. Derrick StoleeMay 7, 2025
  8. Patrick SteinhardtMay 9, 2025
  9. 04/17 odb: introduce parent pointersPatrick Steinhardt, May 6, 2025
  10. 03/17 object-store: rename files to "odb.{c,h}"Patrick Steinhardt, May 6, 2025
  11. Derrick StoleeMay 6, 2025
  12. 05/17 odb: get rid of `the_repository` in `find_odb()`Patrick Steinhardt, May 6, 2025
  13. Derrick StoleeMay 7, 2025
  14. Patrick SteinhardtMay 9, 2025
  15. 06/17 odb: get rid of `the_repository` in `assert_oid_type()`Patrick Steinhardt, May 6, 2025
  16. 07/17 odb: get rid of `the_repository` in `assert_oid_type()`Patrick Steinhardt, May 6, 2025
  17. Derrick StoleeMay 7, 2025
  18. Patrick SteinhardtMay 9, 2025
  19. 08/17 odb: get rid of `the_repository` when handling alternatesPatrick Steinhardt, May 6, 2025
  20. Derrick StoleeMay 7, 2025
  21. 09/17 odb: get rid of `the_repository` in `for_each()` functionsPatrick Steinhardt, May 6, 2025
  22. Derrick StoleeMay 7, 2025
  23. Patrick SteinhardtMay 9, 2025
  24. Derrick StoleeMay 12, 2025
  25. 10/17 odb: get rid of `the_repository` when handling the primary backendPatrick Steinhardt, May 6, 2025
  26. 11/17 odb: get rid of `the_repository` when handling submodule backendsPatrick Steinhardt, May 6, 2025
  27. Derrick StoleeMay 7, 2025
  28. Derrick StoleeMay 7, 2025
  29. 12/17 odb: trivial refactorings to get rid of `the_repository`Patrick Steinhardt, May 6, 2025
  30. Derrick StoleeMay 7, 2025
  31. Junio C HamanoMay 7, 2025
  32. Patrick SteinhardtMay 9, 2025
  33. 13/17 odb: rename `oid_object_info()`Patrick Steinhardt, May 6, 2025
  34. 14/17 odb: rename `repo_read_object_file()`Patrick Steinhardt, May 6, 2025
  35. 15/17 odb: rename `has_object()`Patrick Steinhardt, May 6, 2025
  36. 16/17 odb: rename `pretend_object_file()`Patrick Steinhardt, May 6, 2025
  37. 17/17 odb: rename `read_object_with_reference()`Patrick Steinhardt, May 6, 2025
  38. Derrick StoleeMay 7, 2025
  39. Junio C HamanoMay 7, 2025
  40. Patrick SteinhardtMay 9, 2025
  41. Patrick SteinhardtMay 9, 2025
  42. Toon ClaesMay 13, 2025
  43. Patrick SteinhardtMay 14, 2025
  44. Junio C HamanoMay 7, 2025
  45. 00/17 object-store: carve out the object database subsystemPatrick Steinhardt, May 9, 2025
  46. 01/17 object-store: rename `raw_object_store` to `object_database`Patrick Steinhardt, May 9, 2025
  47. Toon ClaesMay 13, 2025
  48. 03/17 object-store: rename files to "odb.{c,h}"Patrick Steinhardt, May 9, 2025
  49. Toon ClaesMay 13, 2025
  50. Patrick SteinhardtMay 14, 2025
  51. Junio C HamanoMay 14, 2025
  52. 02/17 object-store: rename `object_directory` to `odb_alternate`Patrick Steinhardt, May 9, 2025
  53. Toon ClaesMay 13, 2025
  54. Patrick SteinhardtMay 14, 2025
  55. 04/17 odb: introduce parent pointersPatrick Steinhardt, May 9, 2025
  56. 05/17 odb: get rid of `the_repository` in `find_odb()`Patrick Steinhardt, May 9, 2025
  57. 06/17 odb: get rid of `the_repository` in `assert_oid_type()`Patrick Steinhardt, May 9, 2025
  58. 07/17 odb: get rid of `the_repository` in `odb_mkstemp()`Patrick Steinhardt, May 9, 2025
  59. 08/17 odb: get rid of `the_repository` when handling alternatesPatrick Steinhardt, May 9, 2025
  60. 09/17 odb: get rid of `the_repository` in `for_each()` functionsPatrick Steinhardt, May 9, 2025
  61. 10/17 odb: get rid of `the_repository` when handling the primary alternatePatrick Steinhardt, May 9, 2025
  62. 11/17 odb: get rid of `the_repository` when handling submodule alternatesPatrick Steinhardt, May 9, 2025
  63. 12/17 odb: trivial refactorings to get rid of `the_repository`Patrick Steinhardt, May 9, 2025
  64. 13/17 odb: rename `oid_object_info()`Patrick Steinhardt, May 9, 2025
  65. 14/17 odb: rename `repo_read_object_file()`Patrick Steinhardt, May 9, 2025
  66. 15/17 odb: rename `has_object()`Patrick Steinhardt, May 9, 2025
  67. 16/17 odb: rename `pretend_object_file()`Patrick Steinhardt, May 9, 2025
  68. 17/17 odb: rename `read_object_with_reference()`Patrick Steinhardt, May 9, 2025
  69. Junio C HamanoMay 9, 2025
  70. Derrick StoleeMay 12, 2025
  71. 00/17 object-store: carve out the object database subsystemPatrick Steinhardt, May 14, 2025
  72. 01/17 object-store: rename `raw_object_store` to `object_database`Patrick Steinhardt, May 14, 2025
  73. Justin ToblerMay 22, 2025
  74. 03/17 object-store: rename files to "odb.{c,h}"Patrick Steinhardt, May 14, 2025
  75. 02/17 object-store: rename `object_directory` to `odb_alternate`Patrick Steinhardt, May 14, 2025
  76. Justin ToblerMay 22, 2025
  77. Patrick SteinhardtMay 26, 2025
  78. Justin ToblerMay 27, 2025
  79. Toon ClaesMay 28, 2025
  80. Patrick SteinhardtMay 30, 2025
  81. Patrick SteinhardtMay 30, 2025
  82. 04/17 odb: introduce parent pointersPatrick Steinhardt, May 14, 2025
  83. 05/17 odb: get rid of `the_repository` in `find_odb()`Patrick Steinhardt, May 14, 2025
  84. 06/17 odb: get rid of `the_repository` in `assert_oid_type()`Patrick Steinhardt, May 14, 2025
  85. 07/17 odb: get rid of `the_repository` in `odb_mkstemp()`Patrick Steinhardt, May 14, 2025
  86. 08/17 odb: get rid of `the_repository` when handling alternatesPatrick Steinhardt, May 14, 2025
  87. 09/17 odb: get rid of `the_repository` in `for_each()` functionsPatrick Steinhardt, May 14, 2025
  88. 10/17 odb: get rid of `the_repository` when handling the primary alternatePatrick Steinhardt, May 14, 2025
  89. 11/17 odb: get rid of `the_repository` when handling submodule alternatesPatrick Steinhardt, May 14, 2025
  90. 12/17 odb: trivial refactorings to get rid of `the_repository`Patrick Steinhardt, May 14, 2025
  91. 13/17 odb: rename `oid_object_info()`Patrick Steinhardt, May 14, 2025
  92. 14/17 odb: rename `repo_read_object_file()`Patrick Steinhardt, May 14, 2025
  93. 15/17 odb: rename `has_object()`Patrick Steinhardt, May 14, 2025
  94. 16/17 odb: rename `pretend_object_file()`Patrick Steinhardt, May 14, 2025
  95. 17/17 odb: rename `read_object_with_reference()`Patrick Steinhardt, May 14, 2025
  96. Toon ClaesMay 14, 2025
  97. Patrick SteinhardtMay 15, 2025
  98. 00/17 object-store: carve out the object database subsystemPatrick Steinhardt, Jun 5, 2025
  99. 01/17 object-store: rename `raw_object_store` to `object_database`Patrick Steinhardt, Jun 5, 2025
  100. 02/17 object-store: rename `object_directory` to `odb_source`Patrick Steinhardt, Jun 5, 2025
  101. Justin ToblerJun 30, 2025
  102. Patrick SteinhardtJul 1, 2025
  103. 05/17 odb: get rid of `the_repository` in `find_odb()`Patrick Steinhardt, Jun 5, 2025
  104. Justin ToblerJun 30, 2025
  105. 04/17 odb: introduce parent pointersPatrick Steinhardt, Jun 5, 2025
  106. Justin ToblerJun 30, 2025
  107. Patrick SteinhardtJul 1, 2025
  108. 03/17 object-store: rename files to "odb.{c,h}"Patrick Steinhardt, Jun 5, 2025
  109. 07/17 odb: get rid of `the_repository` in `odb_mkstemp()`Patrick Steinhardt, Jun 5, 2025
  110. 06/17 odb: get rid of `the_repository` in `assert_oid_type()`Patrick Steinhardt, Jun 5, 2025
  111. 08/17 odb: get rid of `the_repository` when handling alternatesPatrick Steinhardt, Jun 5, 2025
  112. Justin ToblerJun 30, 2025
  113. Patrick SteinhardtJul 1, 2025
  114. 10/17 odb: get rid of `the_repository` when handling the primary sourcePatrick Steinhardt, Jun 5, 2025
  115. 09/17 odb: get rid of `the_repository` in `for_each()` functionsPatrick Steinhardt, Jun 5, 2025
  116. 12/17 odb: trivial refactorings to get rid of `the_repository`Patrick Steinhardt, Jun 5, 2025
  117. 11/17 odb: get rid of `the_repository` when handling submodule sourcesPatrick Steinhardt, Jun 5, 2025
  118. 13/17 odb: rename `oid_object_info()`Patrick Steinhardt, Jun 5, 2025
  119. 14/17 odb: rename `repo_read_object_file()`Patrick Steinhardt, Jun 5, 2025
  120. 15/17 odb: rename `has_object()`Patrick Steinhardt, Jun 5, 2025
  121. 16/17 odb: rename `pretend_object_file()`Patrick Steinhardt, Jun 5, 2025
  122. Justin ToblerJun 30, 2025
  123. 17/17 odb: rename `read_object_with_reference()`Patrick Steinhardt, Jun 5, 2025
  124. Justin ToblerJun 30, 2025
  125. 00/17 object-store: carve out the object database subsystemPatrick Steinhardt, Jul 1, 2025
  126. 01/17 object-store: rename `raw_object_store` to `object_database`Patrick Steinhardt, Jul 1, 2025
  127. 02/17 object-store: rename `object_directory` to `odb_source`Patrick Steinhardt, Jul 1, 2025
  128. 03/17 object-store: rename files to "odb.{c,h}"Patrick Steinhardt, Jul 1, 2025
  129. 04/17 odb: introduce parent pointersPatrick Steinhardt, Jul 1, 2025
  130. 05/17 odb: get rid of `the_repository` in `find_odb()`Patrick Steinhardt, Jul 1, 2025
  131. 06/17 odb: get rid of `the_repository` in `assert_oid_type()`Patrick Steinhardt, Jul 1, 2025
  132. 07/17 odb: get rid of `the_repository` in `odb_mkstemp()`Patrick Steinhardt, Jul 1, 2025
  133. 08/17 odb: get rid of `the_repository` when handling alternatesPatrick Steinhardt, Jul 1, 2025
  134. 09/17 odb: get rid of `the_repository` in `for_each()` functionsPatrick Steinhardt, Jul 1, 2025
  135. 10/17 odb: get rid of `the_repository` when handling the primary sourcePatrick Steinhardt, Jul 1, 2025
  136. 11/17 odb: get rid of `the_repository` when handling submodule sourcesPatrick Steinhardt, Jul 1, 2025
  137. 12/17 odb: trivial refactorings to get rid of `the_repository`Patrick Steinhardt, Jul 1, 2025
  138. 13/17 odb: rename `oid_object_info()`Patrick Steinhardt, Jul 1, 2025
  139. 14/17 odb: rename `repo_read_object_file()`Patrick Steinhardt, Jul 1, 2025
  140. 15/17 odb: rename `has_object()`Patrick Steinhardt, Jul 1, 2025
  141. 16/17 odb: rename `pretend_object_file()`Patrick Steinhardt, Jul 1, 2025
  142. 17/17 odb: rename `read_object_with_reference()`Patrick Steinhardt, Jul 1, 2025
  143. Justin ToblerJul 1, 2025

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.