Andrew's git
/
gitweb.git
/ diff
summary
|
log
|
commit
| diff |
tree
commit
grep
author
committer
pickaxe
?
re
packfile: allow reprepare_packed_git to handle arbitrary repositories
author
Stefan Beller
<sbeller@google.com>
Fri, 23 Mar 2018 17:45:24 +0000
(18:45 +0100)
committer
Junio C Hamano
<gitster@pobox.com>
Mon, 26 Mar 2018 17:07:43 +0000
(10:07 -0700)
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>
packfile.c
patch
|
blob
|
history
packfile.h
patch
|
blob
|
history
raw
|
patch
|
inline
| side by side (parent:
0f90a9f
)
diff --git
a/packfile.c
b/packfile.c
index f6f7a84335d998e120c80cb9f76a9073060d4eae..21d256f85a173fcad738590404215741407b267e 100644
(file)
--- a/
packfile.c
+++ b/
packfile.c
@@
-898,11
+898,11
@@
void prepare_packed_git(struct repository *r)
r->objects->packed_git_initialized = 1;
}
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)
}
struct packed_git *get_packed_git(struct repository *r)
diff --git
a/packfile.h
b/packfile.h
index 3fd90924729e81193de117a341481f840b647730..ee6da3a9ae6b8ffccd379e23e6ba55b713f080bd 100644
(file)
--- a/
packfile.h
+++ b/
packfile.h
@@
-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);
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);
extern void install_packed_git(struct repository *r, struct packed_git *pack);
struct packed_git *get_packed_git(struct repository *r);