From bb6b8e4f877e8b59b3756960e29d1955072dab56 Mon Sep 17 00:00:00 2001 From: Junio C Hamano Date: Mon, 17 Jul 2006 15:04:47 -0700 Subject: sha1_file.c: expose map_sha1_file() interface. This exposes map_sha1_file() interface to mmap a loose object file, and legacy_loose_object() function, split from unpack_sha1_header(). They will be used in the next patch to reuse the deflated data from new-style loose object files when generating packs. Signed-off-by: Junio C Hamano --- cache.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'cache.h') diff --git a/cache.h b/cache.h index eee5fc9f8d..01835ef432 100644 --- a/cache.h +++ b/cache.h @@ -240,6 +240,8 @@ extern int move_temp_to_file(const char *tmpfile, char *filename); extern int has_sha1_pack(const unsigned char *sha1); extern int has_sha1_file(const unsigned char *sha1); +extern void *map_sha1_file(const unsigned char *sha1, unsigned long *); +extern int legacy_loose_object(unsigned char *); extern int has_pack_file(const unsigned char *sha1); extern int has_pack_index(const unsigned char *sha1); -- cgit v1.2.3