Signed-off-by: Jonathan Tan <[email protected]>
---
cache.h | 2 --
pack.h | 2 ++
packfile.c | 24 ++++++++++++++++++++++++
sha1_file.c | 24 ------------------------
4 files changed, 26 insertions(+), 26 deletions(-)
diff --git a/cache.h b/cache.h
index 1f0f47819..c7f802e4a 100644
--- a/cache.h
+++ b/cache.h
@@ -1624,8 +1624,6 @@ unsigned long approximate_object_count(void);
extern struct packed_git *find_sha1_pack(const unsigned char *sha1,
struct packed_git *packs);
-extern void pack_report(void);
-
/*
* Create a temporary file rooted in the object database directory, or
* die on failure. The filename is taken from "pattern", which should have the
diff --git a/pack.h b/pack.h
index 7fcd45f7b..6098bfe40 100644
--- a/pack.h
+++ b/pack.h
@@ -133,4 +133,6 @@ extern unsigned int pack_max_fds;
extern size_t peak_pack_mapped;
extern size_t pack_mapped;
+extern void pack_report(void);
+
#endif
diff --git a/packfile.c b/packfile.c
index 0f46e0617..60d9fc3b0 100644
--- a/packfile.c
+++ b/packfile.c
@@ -35,3 +35,27 @@ struct packed_git *packed_git;
static struct mru packed_git_mru_storage;
struct mru *packed_git_mru = &packed_git_mru_storage;
+
+#define SZ_FMT PRIuMAX
+static inline uintmax_t sz_fmt(size_t s) { return s; }
+
+void pack_report(void)
+{
+ fprintf(stderr,
+ "pack_report: getpagesize() = %10" SZ_FMT "\n"
+ "pack_report: core.packedGitWindowSize = %10" SZ_FMT "\n"
+ "pack_report: core.packedGitLimit = %10" SZ_FMT "\n",
+ sz_fmt(getpagesize()),
+ sz_fmt(packed_git_window_size),
+ sz_fmt(packed_git_limit));
+ fprintf(stderr,
+ "pack_report: pack_used_ctr = %10u\n"
+ "pack_report: pack_mmap_calls = %10u\n"
+ "pack_report: pack_open_windows = %10u / %10u\n"
+ "pack_report: pack_mapped = "
+ "%10" SZ_FMT " / %10" SZ_FMT "\n",
+ pack_used_ctr,
+ pack_mmap_calls,
+ pack_open_windows, peak_pack_open_windows,
+ sz_fmt(pack_mapped), sz_fmt(peak_pack_mapped));
+}
diff --git a/sha1_file.c b/sha1_file.c
index 4d95e21eb..0de39f480 100644
--- a/sha1_file.c
+++ b/sha1_file.c
@@ -29,9 +29,6 @@
#include "mergesort.h"
#include "quote.h"
-#define SZ_FMT PRIuMAX
-static inline uintmax_t sz_fmt(size_t s) { return s; }
-
const unsigned char null_sha1[20];
const struct object_id null_oid;
const struct object_id empty_tree_oid = {
@@ -682,27 +679,6 @@ static int has_loose_object(const unsigned char *sha1)
return check_and_freshen(sha1, 0);
}
-void pack_report(void)
-{
- fprintf(stderr,
- "pack_report: getpagesize() = %10" SZ_FMT "\n"
- "pack_report: core.packedGitWindowSize = %10" SZ_FMT "\n"
- "pack_report: core.packedGitLimit = %10" SZ_FMT "\n",
- sz_fmt(getpagesize()),
- sz_fmt(packed_git_window_size),
- sz_fmt(packed_git_limit));
- fprintf(stderr,
- "pack_report: pack_used_ctr = %10u\n"
- "pack_report: pack_mmap_calls = %10u\n"
- "pack_report: pack_open_windows = %10u / %10u\n"
- "pack_report: pack_mapped = "
- "%10" SZ_FMT " / %10" SZ_FMT "\n",
- pack_used_ctr,
- pack_mmap_calls,
- pack_open_windows, peak_pack_open_windows,
- sz_fmt(pack_mapped), sz_fmt(peak_pack_mapped));
-}
-
/*
* Open and mmap the index file at path, perform a couple of
* consistency checks, then record its information to p. Return 0 on
--
2.14.0.434.g98096fd7a8-goog