]> git.ipfire.org Git - thirdparty/git.git/blobdiff - packfile.c
Merge branch 'bc/tree-walk-oid'
[thirdparty/git.git] / packfile.c
index e38af1a275a52a6cf5d7eda9789c4e061a735f74..ac6bb64bc39968801bc829389abcb077750a834f 100644 (file)
@@ -994,11 +994,8 @@ void reprepare_packed_git(struct repository *r)
 {
        struct object_directory *odb;
 
-       for (odb = r->objects->odb; odb; odb = odb->next) {
-               oid_array_clear(&odb->loose_objects_cache);
-               memset(&odb->loose_objects_subdir_seen, 0,
-                      sizeof(odb->loose_objects_subdir_seen));
-       }
+       for (odb = r->objects->odb; odb; odb = odb->next)
+               odb_clear_loose_cache(odb);
 
        r->objects->approximate_object_count_valid = 0;
        r->objects->packed_git_initialized = 0;