aboutsummaryrefslogtreecommitdiff
path: root/cache.h
diff options
context:
space:
mode:
authorJunio C Hamano <junkio@cox.net>2006-04-23 16:52:08 -0700
committerJunio C Hamano <junkio@cox.net>2006-04-23 16:57:40 -0700
commit1af1c2b63db6a413fbeb9b08cd55dcb735d7597d (patch)
tree0e6f963270afcd9036a2f224b9e1038ca0500c46 /cache.h
parente64961b0573b0e72bd55eab6d36bd97f859f9516 (diff)
downloadgit-1af1c2b63db6a413fbeb9b08cd55dcb735d7597d.tar.gz
git-1af1c2b63db6a413fbeb9b08cd55dcb735d7597d.tar.xz
read-cache/write-cache: optionally return cache checksum SHA1.
read_cache_1() and write_cache_1() takes an extra parameter *sha1 that returns the checksum of the index file when non-NULL. Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 'cache.h')
-rw-r--r--cache.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/cache.h b/cache.h
index 69801b02d..8c9947ef4 100644
--- a/cache.h
+++ b/cache.h
@@ -138,8 +138,11 @@ extern const char *prefix_filename(const char *prefix, int len, const char *path
#define alloc_nr(x) (((x)+16)*3/2)
/* Initialize and use the cache information */
+extern int read_cache_1(unsigned char *);
+extern int write_cache_1(int, struct cache_entry **, int, unsigned char *);
extern int read_cache(void);
-extern int write_cache(int newfd, struct cache_entry **cache, int entries);
+extern int write_cache(int, struct cache_entry **, int);
+
extern int cache_name_pos(const char *name, int namelen);
#define ADD_CACHE_OK_TO_ADD 1 /* Ok to add */
#define ADD_CACHE_OK_TO_REPLACE 2 /* Ok to replace file/directory */