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>
This commit is contained in:
committed by
Junio C Hamano
parent
25c532f6e0
commit
a59d44ff3f
4
odb.h
4
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
|
||||
|
||||
Reference in New Issue
Block a user