diff options
author | Junio C Hamano <junkio@cox.net> | 2005-06-02 15:20:54 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-06-02 15:48:33 -0700 |
commit | 65c2e0c349aa5c7f605defb52dc67f1b3658a1b9 (patch) | |
tree | 011b8aba6186497e2eece190bb560165a9b44f8f /cache.h | |
parent | 4a62b61939396c512bd7592f800110bddf45af72 (diff) | |
download | git-65c2e0c349aa5c7f605defb52dc67f1b3658a1b9.tar.gz git-65c2e0c349aa5c7f605defb52dc67f1b3658a1b9.tar.xz |
[PATCH] Find size of SHA1 object without inflating everything.
This adds sha1_file_size() helper function and uses it in the
rename/copy similarity estimator. The helper function handles
deltified object as well.
Signed-off-by: Junio C Hamano <junkio@cox.net>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'cache.h')
-rw-r--r-- | cache.h | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -154,6 +154,7 @@ extern void * map_sha1_file(const unsigned char *sha1, unsigned long *size); extern int unpack_sha1_header(z_stream *stream, void *map, unsigned long mapsize, void *buffer, unsigned long size); extern int parse_sha1_header(char *hdr, char *type, unsigned long *sizep); extern int sha1_delta_base(const unsigned char *, unsigned char *); +extern int sha1_file_size(const unsigned char *, unsigned long *); extern void * unpack_sha1_file(void *map, unsigned long mapsize, char *type, unsigned long *size); extern void * read_sha1_file(const unsigned char *sha1, char *type, unsigned long *size); extern int write_sha1_file(void *buf, unsigned long len, const char *type, unsigned char *return_sha1); |