Skip to contentSkip to conversation

Add cache_sha1_file() interface.

PATCH In review Junio C Hamano 1 participant 1 message Jun 15, 2016

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 Add cache_sha1_file() interface.

The new interface allows an application to temporarily hash a small number of objects and pretend that they are available in the object store without actually writing them.

---
 cache.h     |    1 +
 sha1_file.c |   57 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 58 insertions(+), 0 deletions(-)
cache.h +1 -0
index 38a9bc0..8775088 100644
@@ -257,6 +257,7 @@ extern void * unpack_sha1_file(void *map, unsigned long mapsize, char *type, uns
 extern void * read_sha1_file(const unsigned char *sha1, char *type, unsigned long *size);
 extern int hash_sha1_file(void *buf, unsigned long len, const char *type, unsigned char *sha1);
 extern int write_sha1_file(void *buf, unsigned long len, const char *type, unsigned char *return_sha1);
+extern int cache_sha1_file(void *, unsigned long, const char *, unsigned char *);
 
 extern int check_sha1_signature(const unsigned char *sha1, void *buf, unsigned long size, const char *type);
 
sha1_file.c +57 -0

67 lines not on this page · raw message

Signature · 1 line
1.5.0.rc3.58.g79812