aboutsummaryrefslogtreecommitdiffstats
path: root/odb.h
diff options
context:
space:
mode:
authorPatrick Steinhardt <ps@pks.im>2025-08-11 15:46:44 +0200
committerJunio C Hamano <gitster@pobox.com>2025-08-11 09:22:21 -0700
commita59d44ff3f0f308f9577b05c858c063d2466b061 (patch)
tree092f3869cb42a455a5c59b371e9140415a5088d1 /odb.h
parent25c532f6e0797ef501ce43835fb4af4bd9c33de5 (diff)
downloadgit-a59d44ff3f0f308f9577b05c858c063d2466b061.tar.gz
odb: return newly created in-memory sources
Callers have no trivial way to obtain the newly created object database source when adding it to the in-memory list of alternates. While not yet needed anywhere, a subsequent commit will want to obtain that pointer. Refactor the function to return the source to make it easily accessible. Signed-off-by: Patrick Steinhardt <ps@pks.im> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'odb.h')
-rw-r--r--odb.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/odb.h b/odb.h
index 312921077b..d769132699 100644
--- a/odb.h
+++ b/odb.h
@@ -268,8 +268,8 @@ void odb_add_to_alternates_file(struct object_database *odb,
* 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);
+struct odb_source *odb_add_to_alternates_memory(struct object_database *odb,
+ const char *dir);
/*
* Read an object from the database. Returns the object data and assigns object