X-Git-Url: https://git.verplant.org/?a=blobdiff_plain;f=cache.h;h=7cb5b554b3de43bacbcfeaf328481c58ec98888c;hb=12dccc165400beae564d2357ce86c71937e5cdc0;hp=28e3dbddcabbbff0f246a21114f27e1e5721ce04;hpb=958ba6c96eb58b359c855c9d07e3e45072f0503e;p=git.git diff --git a/cache.h b/cache.h index 28e3dbdd..7cb5b554 100644 --- a/cache.h +++ b/cache.h @@ -10,6 +10,7 @@ #include #include #include +#include #include #include #include @@ -150,6 +151,10 @@ 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 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); @@ -209,4 +214,15 @@ static inline void *xcalloc(size_t nmemb, size_t size) return ret; } +struct checkout { + const char *base_dir; + int base_dir_len; + unsigned force:1, + quiet:1, + not_new:1, + refresh_cache:1; +}; + +extern int checkout_entry(struct cache_entry *ce, struct checkout *state); + #endif /* CACHE_H */