aboutsummaryrefslogtreecommitdiffstats
path: root/packfile.h
diff options
context:
space:
mode:
authorJonathan Tan <jonathantanmy@google.com>2017-08-18 15:20:33 -0700
committerJunio C Hamano <gitster@pobox.com>2017-08-23 15:12:07 -0700
commita2551953b9619b285128c1e9cf35120fb7555d8f (patch)
tree719abecbe407fddd939f846e66c90fa657916a99 /packfile.h
parent9e0f45f5a61d9d0556e6004198dd6a650be14bd9 (diff)
downloadgit-a2551953b9619b285128c1e9cf35120fb7555d8f.tar.gz
pack: move find_pack_entry_one(), is_pack_valid()
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.h9
1 files changed, 7 insertions, 2 deletions
diff --git a/packfile.h b/packfile.h
index f4f5b936fc..4ab15116c0 100644
--- a/packfile.h
+++ b/packfile.h
@@ -93,6 +93,13 @@ extern const struct object_id *nth_packed_object_oid(struct object_id *, struct
*/
extern off_t nth_packed_object_offset(const struct packed_git *, uint32_t n);
+/*
+ * If the object named sha1 is present in the specified packfile,
+ * return its offset within the packfile; otherwise, return 0.
+ */
+extern off_t find_pack_entry_one(const unsigned char *sha1, struct packed_git *);
+
+extern int is_pack_valid(struct packed_git *);
extern void *unpack_entry(struct packed_git *, off_t, enum object_type *, unsigned long *);
extern unsigned long unpack_object_header_buffer(const unsigned char *buf, unsigned long len, enum object_type *type, unsigned long *sizep);
extern unsigned long get_size_from_delta(struct packed_git *, struct pack_window **, off_t);
@@ -100,8 +107,6 @@ extern int unpack_object_header(struct packed_git *, struct pack_window **, off_
extern void release_pack_memory(size_t);
-extern int open_packed_git(struct packed_git *p);
-
/* global flag to enable extra checks when accessing packed objects */
extern int do_check_packed_object_crc;