aboutsummaryrefslogtreecommitdiff
path: root/cache.h
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2011-05-14 19:42:10 -0700
committerJunio C Hamano <gitster@pobox.com>2011-05-20 23:16:53 -0700
commitf0270efd460e5ee28dca8481181f1ac1ed4111d1 (patch)
treeb6177f3cddaf086d97645c4a8c607a333234f108 /cache.h
parent7ef2d9a2604b0cd554e59f948f2c879b3708dfa5 (diff)
downloadgit-f0270efd460e5ee28dca8481181f1ac1ed4111d1.tar.gz
git-f0270efd460e5ee28dca8481181f1ac1ed4111d1.tar.xz
sha1_file.c: expose helpers to read loose objects
Make map_sha1_file(), parse_sha1_header() and unpack_sha1_header() available to the streaming read API by exporting them via cache.h header file. Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'cache.h')
-rw-r--r--cache.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/cache.h b/cache.h
index 2a7a77f3e..a5067ba12 100644
--- a/cache.h
+++ b/cache.h
@@ -780,6 +780,9 @@ extern int hash_sha1_file(const void *buf, unsigned long len, const char *type,
extern int write_sha1_file(const void *buf, unsigned long len, const char *type, unsigned char *return_sha1);
extern int pretend_sha1_file(void *, unsigned long, enum object_type, unsigned char *);
extern int force_object_loose(const unsigned char *sha1, time_t mtime);
+extern void *map_sha1_file(const unsigned char *sha1, unsigned long *size);
+extern int unpack_sha1_header(z_stream *stream, unsigned char *map, unsigned long mapsize, void *buffer, unsigned long bufsiz);
+extern int parse_sha1_header(const char *hdr, unsigned long *sizep);
/* global flag to enable extra checks when accessing packed objects */
extern int do_check_packed_object_crc;