Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Beller <sbeller@google.com>2018-03-23 20:45:23 +0300
committerJunio C Hamano <gitster@pobox.com>2018-03-26 20:07:43 +0300
commit0f90a9f27e464caffe69c5ab9e4d744b53bad143 (patch)
tree5f88ceafc720944e3e19d32d9da2d734fea251d3 /packfile.c
parent935cdd6922e40f5812cdcf2741d274ab2fc110a6 (diff)
packfile: allow prepare_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 'packfile.c')
-rw-r--r--packfile.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/packfile.c b/packfile.c
index fd6aa54b4b..f6f7a84335 100644
--- a/packfile.c
+++ b/packfile.c
@@ -883,19 +883,19 @@ static void prepare_packed_git_mru(struct repository *r)
list_add_tail(&p->mru, &r->objects->packed_git_mru);
}
-void prepare_packed_git_the_repository(void)
+void prepare_packed_git(struct repository *r)
{
struct alternate_object_database *alt;
- if (the_repository->objects->packed_git_initialized)
+ if (r->objects->packed_git_initialized)
return;
- prepare_packed_git_one(the_repository, get_object_directory(), 1);
- prepare_alt_odb(the_repository);
- for (alt = the_repository->objects->alt_odb_list; alt; alt = alt->next)
- prepare_packed_git_one(the_repository, alt->path, 0);
- rearrange_packed_git(the_repository);
- prepare_packed_git_mru(the_repository);
- the_repository->objects->packed_git_initialized = 1;
+ prepare_packed_git_one(r, r->objects->objectdir, 1);
+ prepare_alt_odb(r);
+ for (alt = r->objects->alt_odb_list; alt; alt = alt->next)
+ prepare_packed_git_one(r, alt->path, 0);
+ rearrange_packed_git(r);
+ prepare_packed_git_mru(r);
+ r->objects->packed_git_initialized = 1;
}
void reprepare_packed_git_the_repository(void)