1
0
Fork 0
mirror of https://github.com/git/git.git synced 2024-10-28 04:49:43 +01:00

packfile: allow reprepare_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>
This commit is contained in:
Stefan Beller 2018-03-23 18:45:24 +01:00 committed by Junio C Hamano
parent 0f90a9f27e
commit 4c2a13b4e2
2 changed files with 5 additions and 6 deletions

View file

@ -898,11 +898,11 @@ void prepare_packed_git(struct repository *r)
r->objects->packed_git_initialized = 1;
}
void reprepare_packed_git_the_repository(void)
void reprepare_packed_git(struct repository *r)
{
the_repository->objects->approximate_object_count_valid = 0;
the_repository->objects->packed_git_initialized = 0;
prepare_packed_git(the_repository);
r->objects->approximate_object_count_valid = 0;
r->objects->packed_git_initialized = 0;
prepare_packed_git(r);
}
struct packed_git *get_packed_git(struct repository *r)

View file

@ -35,8 +35,7 @@ extern struct packed_git *parse_pack_index(unsigned char *sha1, const char *idx_
extern void (*report_garbage)(unsigned seen_bits, const char *path);
extern void prepare_packed_git(struct repository *r);
#define reprepare_packed_git(r) reprepare_packed_git_##r()
extern void reprepare_packed_git_the_repository(void);
extern void reprepare_packed_git(struct repository *r);
extern void install_packed_git(struct repository *r, struct packed_git *pack);
struct packed_git *get_packed_git(struct repository *r);