diff options
author | Nguyễn Thái Ngọc Duy <pclouds@gmail.com> | 2018-11-10 06:49:08 +0100 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2018-11-12 06:50:06 +0100 |
commit | 7c14112741b81366cfbbc3b98e0b92422fcce83d (patch) | |
tree | 25ea81f5000e4f9cdf5b80b39c00a1021c917188 /pack-objects.c | |
parent | pack-check.c: remove the_repository references (diff) | |
download | git-7c14112741b81366cfbbc3b98e0b92422fcce83d.tar.xz git-7c14112741b81366cfbbc3b98e0b92422fcce83d.zip |
pack-*.c: remove the_repository references
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 'pack-objects.c')
-rw-r--r-- | pack-objects.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/pack-objects.c b/pack-objects.c index b6cdbb0166..9c45842df3 100644 --- a/pack-objects.c +++ b/pack-objects.c @@ -99,7 +99,7 @@ static void prepare_in_pack_by_idx(struct packing_data *pdata) * (i.e. in_pack_idx also zero) should return NULL. */ mapping[cnt++] = NULL; - for (p = get_all_packs(the_repository); p; p = p->next, cnt++) { + for (p = get_all_packs(pdata->repo); p; p = p->next, cnt++) { if (cnt == nr) { free(mapping); return; @@ -133,8 +133,10 @@ void oe_map_new_pack(struct packing_data *pack, } /* assume pdata is already zero'd by caller */ -void prepare_packing_data(struct packing_data *pdata) +void prepare_packing_data(struct repository *r, struct packing_data *pdata) { + pdata->repo = r; + if (git_env_bool("GIT_TEST_FULL_IN_PACK_ARRAY", 0)) { /* * do not initialize in_pack_by_idx[] to force the |