The last caller of `tmp_objdir_add_as_alternate()` went away in
bdee7b3013 (builtin/receive-pack: stage incoming objects via ODB
transactions, 2026-07-10) and is unused now. Remove the function.
Signed-off-by: Patrick Steinhardt <redacted>
---
tmp-objdir.c | 5 -----
tmp-objdir.h | 6 ------
2 files changed, 11 deletions(-)
diff --git a/tmp-objdir.c b/tmp-objdir.c
index 0eaa79ffd7..deaaf6ba2e 100644
--- a/tmp-objdir.c
+++ b/tmp-objdir.c
@@ -321,11 +321,6 @@ const char **tmp_objdir_env(const struct tmp_objdir *t)
return t->env.v;
}
-void tmp_objdir_add_as_alternate(const struct tmp_objdir *t)
-{
- odb_add_to_alternates_memory(t->repo->objects, t->path.buf);
-}
-
struct odb_source *tmp_objdir_replace_primary_odb(struct tmp_objdir *t,
int will_destroy)
{diff --git a/tmp-objdir.h b/tmp-objdir.h
index 81eb927413..05f0d08d10 100644
--- a/tmp-objdir.h
+++ b/tmp-objdir.h
@@ -55,12 +55,6 @@ int tmp_objdir_destroy(struct tmp_objdir *);
*/
void tmp_objdir_discard_objects(struct tmp_objdir *);
-/*
- * Add the temporary object directory as an alternate object store in the
- * current process.
- */
-void tmp_objdir_add_as_alternate(const struct tmp_objdir *);
-
/*
* Replaces the writable object store in the current process with the temporary
* object directory and makes the former main object store an alternate.
--
2.55.0.1074.ge7621b4bad.dirty