path: root/packfile.h
diff options
authorJeff Hostetler <>2019-03-21 19:36:15 (GMT)
committerJunio C Hamano <>2019-03-22 05:31:11 (GMT)
commit5ae18df9d8ed27625f81974c3fb2db179a23ca2d (patch)
tree8c9e7cd9e68e9eb154bf9e867576990a83ee8296 /packfile.h
parent430efb8a74bd9ce9b6019b37cda21063914b0038 (diff)
midx: during verify group objects by packfile to speed verification
Teach `multi-pack-index verify` to sort the set of object by packfile so that only one packfile needs to be open at a time. This is a performance improvement. Previously, objects were verified in OID order. This essentially requires all packfiles to be open at the same time. If the number of packfiles exceeds the open file limit, packfiles would be LRU-closed and re-opened many times. Signed-off-by: Jeff Hostetler <> Signed-off-by: Junio C Hamano <>
Diffstat (limited to 'packfile.h')
1 files changed, 2 insertions, 0 deletions
diff --git a/packfile.h b/packfile.h
index d70c6d9..b1c1850 100644
--- a/packfile.h
+++ b/packfile.h
@@ -76,6 +76,8 @@ extern int open_pack_index(struct packed_git *);
extern void close_pack_index(struct packed_git *);
+int close_pack_fd(struct packed_git *p);
extern uint32_t get_pack_fanout(struct packed_git *p, uint32_t value);
extern unsigned char *use_pack(struct packed_git *, struct pack_window **, off_t, unsigned long *);