unpack_object_header(): make it public
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>
Junio C Hamano committed
May 13, 2011 at 15:33 UTC
f8c8abc5b76ffd763b9c7c5e4fb054358e82ca28
2 files changed
+5
-4
cache.h
+1
@@ -1021,6 +1021,7 @@ extern void *unpack_entry(struct packed_git *, off_t, enum object_type *, unsign
1021
extern unsigned long unpack_object_header_buffer(const unsigned char *buf, unsigned long len, enum object_type *type, unsigned long *sizep);
1022
extern unsigned long get_size_from_delta(struct packed_git *, struct pack_window **, off_t);
1023
extern int packed_object_info_detail(struct packed_git *, off_t, unsigned long *, unsigned long *, unsigned int *, unsigned char *);
1024
+extern int unpack_object_header(struct packed_git *, struct pack_window **, off_t *, unsigned long *);
1025
1026
struct object_info {
1027
/* Request */
sha1_file.c
+4
-4
@@ -1523,10 +1523,10 @@ static int packed_delta_info(struct packed_git *p,
1523
return type;
1524
}
1525
1526
-static int unpack_object_header(struct packed_git *p,
1527
- struct pack_window **w_curs,
1528
- off_t *curpos,
1529
- unsigned long *sizep)
1526
+int unpack_object_header(struct packed_git *p,
1527
+ struct pack_window **w_curs,
1528
+ off_t *curpos,
1529
+ unsigned long *sizep)
1530
{
1531
unsigned char *base;
1532
unsigned int left;