mirror of
https://github.com/git/git.git
synced 2025-12-12 20:36:24 +01:00
packfile: split up responsibilities of reprepare_packed_git()
In `reprepare_packed_git()` we perform a couple of operations: - We reload alternate object directories. - We clear the loose object cache. - We reprepare packfiles. While the logic is hosted in "packfile.c", it clearly reaches into other subsystems that aren't related to packfiles. Split up the responsibility and introduce `odb_reprepare()` which now becomes responsible for repreparing the whole object database. The existing `reprepare_packed_git()` function is refactored accordingly and only cares about reloading the packfile store now. 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
c36ecc0685
commit
78237ea53d
@@ -596,7 +596,7 @@ static enum get_oid_result get_short_oid(struct repository *r,
|
||||
* or migrated from loose to packed.
|
||||
*/
|
||||
if (status == MISSING_OBJECT) {
|
||||
reprepare_packed_git(r);
|
||||
odb_reprepare(r->objects);
|
||||
find_short_object_filename(&ds);
|
||||
find_short_packed_object(&ds);
|
||||
status = finish_object_disambiguation(&ds, oid);
|
||||
|
||||
Reference in New Issue
Block a user