summaryrefslogtreecommitdiff
path: root/cache.h
diff options
context:
space:
mode:
authorNicolas Pitre <nico@cam.org>2008-06-25 03:17:12 (GMT)
committerJunio C Hamano <gitster@pobox.com>2008-06-25 06:58:57 (GMT)
commit99093238bbf2cd886debf7bdb91478cb405ef66d (patch)
tree799a8766f4dc7d3414ac31200149ba9945b1c6c2 /cache.h
parent8e21d63b02f1b26f7695ca515e51e4622a995af2 (diff)
downloadgit-99093238bbf2cd886debf7bdb91478cb405ef66d.zip
git-99093238bbf2cd886debf7bdb91478cb405ef66d.tar.gz
git-99093238bbf2cd886debf7bdb91478cb405ef66d.tar.bz2
optimize verify-pack a bit
Using find_pack_entry_one() to get object offsets is rather suboptimal when nth_packed_object_offset() can be used directly. Signed-off-by: Nicolas Pitre <nico@cam.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'cache.h')
-rw-r--r--cache.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/cache.h b/cache.h
index a9c14da..c8954ef 100644
--- a/cache.h
+++ b/cache.h
@@ -712,6 +712,7 @@ extern void close_pack_windows(struct packed_git *);
extern void unuse_pack(struct pack_window **);
extern struct packed_git *add_packed_git(const char *, int, int);
extern const unsigned char *nth_packed_object_sha1(struct packed_git *, uint32_t);
+extern off_t nth_packed_object_offset(const struct packed_git *, uint32_t);
extern off_t find_pack_entry_one(const unsigned char *, struct packed_git *);
extern void *unpack_entry(struct packed_git *, off_t, enum object_type *, unsigned long *);
extern unsigned long unpack_object_header_gently(const unsigned char *buf, unsigned long len, enum object_type *type, unsigned long *sizep);