Skip to content

Commit 072a109

Browse files
stefanbellergitster
authored andcommitted
packfile: add repository argument to prepare_packed_git_one
Signed-off-by: Stefan Beller <[email protected]> Signed-off-by: Junio C Hamano <[email protected]> Signed-off-by: Nguyễn Thái Ngọc Duy <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 5babff1 commit 072a109

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

packfile.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -735,7 +735,8 @@ static void report_pack_garbage(struct string_list *list)
735735
report_helper(list, seen_bits, first, list->nr);
736736
}
737737

738-
static void prepare_packed_git_one(char *objdir, int local)
738+
#define prepare_packed_git_one(r, o, l) prepare_packed_git_one_##r(o, l)
739+
static void prepare_packed_git_one_the_repository(char *objdir, int local)
739740
{
740741
struct strbuf path = STRBUF_INIT;
741742
size_t dirnamelen;
@@ -889,10 +890,10 @@ void prepare_packed_git(void)
889890

890891
if (the_repository->objects->packed_git_initialized)
891892
return;
892-
prepare_packed_git_one(get_object_directory(), 1);
893+
prepare_packed_git_one(the_repository, get_object_directory(), 1);
893894
prepare_alt_odb(the_repository);
894895
for (alt = the_repository->objects->alt_odb_list; alt; alt = alt->next)
895-
prepare_packed_git_one(alt->path, 0);
896+
prepare_packed_git_one(the_repository, alt->path, 0);
896897
rearrange_packed_git(the_repository);
897898
prepare_packed_git_mru(the_repository);
898899
the_repository->objects->packed_git_initialized = 1;

0 commit comments

Comments
 (0)