diff options
author | Stefan Beller <sbeller@google.com> | 2018-03-23 18:45:17 +0100 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2018-03-26 19:07:43 +0200 |
commit | c235beac4e51ce7ebfefe6c9c38d3b8906222ed2 (patch) | |
tree | a52e27a0e4344174984934e932cd6c2de67f9d0e /packfile.c | |
parent | packfile: allow prepare_packed_git_mru to handle arbitrary repositories (diff) | |
download | git-c235beac4e51ce7ebfefe6c9c38d3b8906222ed2.tar.xz git-c235beac4e51ce7ebfefe6c9c38d3b8906222ed2.zip |
packfile: allow rearrange_packed_git to handle arbitrary repositories
Signed-off-by: Stefan Beller <sbeller@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to '')
-rw-r--r-- | packfile.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/packfile.c b/packfile.c index e954b575c3..326c171e98 100644 --- a/packfile.c +++ b/packfile.c @@ -866,10 +866,10 @@ static int sort_pack(const void *a_, const void *b_) return -1; } -static void rearrange_packed_git(void) +static void rearrange_packed_git(struct repository *r) { - the_repository->objects->packed_git = llist_mergesort( - the_repository->objects->packed_git, get_next_packed_git, + r->objects->packed_git = llist_mergesort( + r->objects->packed_git, get_next_packed_git, set_next_packed_git, sort_pack); } @@ -893,7 +893,7 @@ void prepare_packed_git(void) prepare_alt_odb(the_repository); for (alt = the_repository->objects->alt_odb_list; alt; alt = alt->next) prepare_packed_git_one(alt->path, 0); - rearrange_packed_git(); + rearrange_packed_git(the_repository); prepare_packed_git_mru(the_repository); the_repository->objects->packed_git_initialized = 1; } |