summaryrefslogtreecommitdiff
path: root/packfile.h
diff options
context:
space:
mode:
authorJonathan Tan <jonathantanmy@google.com>2017-08-18 15:20:26 -0700
committerJunio C Hamano <gitster@pobox.com>2017-08-23 15:12:07 -0700
commit0abe14f6a5b7681b4ea02d1bd0a64332587ae053 (patch)
tree0197f856e42a9eda81b1addf3d2ec9effb5c3549 /packfile.h
parente65f186242ccda24616e40681f46ad8d33da63e2 (diff)
downloadgit-0abe14f6a5b7681b4ea02d1bd0a64332587ae053.tar.gz
pack: move {,re}prepare_packed_git and approximate_object_count
Signed-off-by: Jonathan Tan <jonathantanmy@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'packfile.h')
-rw-r--r--packfile.h16
1 files changed, 14 insertions, 2 deletions
diff --git a/packfile.h b/packfile.h
index e7d27c0e97..97246ca1ad 100644
--- a/packfile.h
+++ b/packfile.h
@@ -24,12 +24,24 @@ extern char *sha1_pack_name(const unsigned char *sha1);
*/
extern char *sha1_pack_index_name(const unsigned char *sha1);
-extern unsigned int pack_open_fds;
-
extern struct packed_git *parse_pack_index(unsigned char *sha1, const char *idx_path);
+/* A hook to report invalid files in pack directory */
+#define PACKDIR_FILE_PACK 1
+#define PACKDIR_FILE_IDX 2
+#define PACKDIR_FILE_GARBAGE 4
+extern void (*report_garbage)(unsigned seen_bits, const char *path);
+
+extern void prepare_packed_git(void);
+extern void reprepare_packed_git(void);
extern void install_packed_git(struct packed_git *pack);
+/*
+ * Give a rough count of objects in the repository. This sacrifices accuracy
+ * for speed.
+ */
+unsigned long approximate_object_count(void);
+
extern void pack_report(void);
/*