Code

unpack_object_header(): make it public
authorJunio C Hamano <gitster@pobox.com>
Fri, 13 May 2011 22:33:33 +0000 (15:33 -0700)
committerJunio C Hamano <gitster@pobox.com>
Sat, 21 May 2011 01:38:54 +0000 (18:38 -0700)
This function is used to read and skip over the per-object header
in a packfile.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
cache.h
sha1_file.c

diff --git a/cache.h b/cache.h
index 3a1af9d958bfc5c6c0dbdd1dd1a5907c032a032d..7650d2e691e9d7e4a9ef7aca437b59ee2a198652 100644 (file)
--- a/cache.h
+++ b/cache.h
@@ -1021,6 +1021,7 @@ extern void *unpack_entry(struct packed_git *, off_t, enum object_type *, unsign
 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);
 extern int packed_object_info_detail(struct packed_git *, off_t, unsigned long *, unsigned long *, unsigned int *, unsigned char *);
+extern int unpack_object_header(struct packed_git *, struct pack_window **, off_t *, unsigned long *);
 
 struct object_info {
        /* Request */
index 1d6f93d5d323818753c81b790dc48469f21ef8a5..a28683aaf0b3be2308caf89674a59d4d6ad9ac31 100644 (file)
@@ -1523,10 +1523,10 @@ static int packed_delta_info(struct packed_git *p,
        return type;
 }
 
-static int unpack_object_header(struct packed_git *p,
-                               struct pack_window **w_curs,
-                               off_t *curpos,
-                               unsigned long *sizep)
+int unpack_object_header(struct packed_git *p,
+                        struct pack_window **w_curs,
+                        off_t *curpos,
+                        unsigned long *sizep)
 {
        unsigned char *base;
        unsigned int left;