aboutsummaryrefslogtreecommitdiffstats
path: root/builtin/pack-objects.c
diff options
context:
space:
mode:
Diffstat (limited to 'builtin/pack-objects.c')
-rw-r--r--builtin/pack-objects.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/builtin/pack-objects.c b/builtin/pack-objects.c
index e8e85d8278..9e85293730 100644
--- a/builtin/pack-objects.c
+++ b/builtin/pack-objects.c
@@ -4342,9 +4342,8 @@ static int add_loose_object(const struct object_id *oid, const char *path,
*/
static void add_unreachable_loose_objects(void)
{
- for_each_loose_file_in_objdir(repo_get_object_directory(the_repository),
- add_loose_object,
- NULL, NULL, NULL);
+ for_each_loose_file_in_source(the_repository->objects->sources,
+ add_loose_object, NULL, NULL, NULL);
}
static int has_sha1_pack_kept_or_nonlocal(const struct object_id *oid)