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 <junkio@cox.net>
This commit is contained in:
2
cache.h
2
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);
|
||||
|
Reference in New Issue
Block a user