In the next commit we'll want to access the delta base cache in
`close_pack()`. Move the function after the declaration of the cache so
that we won't need a forward declaration.
Signed-off-by: Patrick Steinhardt <redacted>
---
packfile.c | 20 ++++++++++----------
1 file changed, 10 insertions(+), 10 deletions(-)
diff --git a/packfile.c b/packfile.c
index 4fa5fd67c8..af1b837974 100644
--- a/packfile.c
+++ b/packfile.c
@@ -355,16 +355,6 @@ static void close_pack_mtimes(struct packed_git *p)
p->mtimes_map = NULL;
}
-void close_pack(struct packed_git *p)
-{
- close_pack_windows(p);
- close_pack_fd(p);
- close_pack_index(p);
- close_pack_revindex(p);
- close_pack_mtimes(p);
- oidset_clear(&p->bad_objects);
-}
-
void unlink_pack_path(const char *pack_name, int force_delete)
{
static const char *exts[] = {".idx", ".pack", ".rev", ".keep", ".bitmap", ".promisor", ".mtimes"};@@ -1263,6 +1253,16 @@ void clear_delta_base_cache(void)
}
}
+void close_pack(struct packed_git *p)
+{
+ close_pack_windows(p);
+ close_pack_fd(p);
+ close_pack_index(p);
+ close_pack_revindex(p);
+ close_pack_mtimes(p);
+ oidset_clear(&p->bad_objects);
+}
+
static void add_delta_base_cache(struct packed_git *p, off_t base_offset,
void *base, size_t base_size,
size_t delta_base_cache_limit,
--
2.56.0.406.ga2d225a756.dirty