tmp-objdir: drop unused function to register alternate

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 <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Patrick Steinhardt authored and Junio C Hamano committed 2026-09-11 08:46:10 -07:00
1 parent 5c5dfbeef6
commit 60942e28b3
2 files changed
-11

No files matched your search

-5
View File
@@ -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)
{
-6
View File
@@ -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.