summaryrefslogtreecommitdiff
path: root/cache.h
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@ppc970.osdl.org>2005-06-02 14:57:25 (GMT)
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-06-02 14:57:25 (GMT)
commit5180cacc202bb20b15981469487eb8d6b0509997 (patch)
tree186bfccb121679411cfecba5c276483809b7ec31 /cache.h
parentc4483576b8d30fadcae208d8f12383febd060d0a (diff)
downloadgit-5180cacc202bb20b15981469487eb8d6b0509997.zip
git-5180cacc202bb20b15981469487eb8d6b0509997.tar.gz
git-5180cacc202bb20b15981469487eb8d6b0509997.tar.bz2
Split up unpack_sha1_file() some more
Make a separate helper for parsing the header of an object file (really carefully) and for unpacking the rest. This means that anybody who uses the "unpack_sha1_header()" interface can easily look at the header and decide to unpack the rest too, without doing any extra work.
Diffstat (limited to 'cache.h')
-rw-r--r--cache.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/cache.h b/cache.h
index 69b63ba..aa74bcc 100644
--- a/cache.h
+++ b/cache.h
@@ -152,6 +152,7 @@ extern char *sha1_file_name(const unsigned char *sha1);
/* Read and unpack a sha1 file into memory, write memory to a sha1 file */
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 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);