]> git.ipfire.org Git - thirdparty/git.git/commit
odb: return newly created in-memory sources
authorPatrick Steinhardt <ps@pks.im>
Thu, 7 Aug 2025 08:09:53 +0000 (10:09 +0200)
committerJunio C Hamano <gitster@pobox.com>
Thu, 7 Aug 2025 22:15:48 +0000 (15:15 -0700)
commita511f39c12d2cf36ce87a1ead886fe8ca11e2da3
treeb1aa805028b014883a4cacb9169594c8afa4313f
parent05fd41c4be5ca9e9d1ef2c910845b764ae6c7b21
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>
odb.c
odb.h