Merge branch 'ym/fix-opportunistic-index-update-race'
[gitweb.git] / cache.h
diff --git a/cache.h b/cache.h
index ef4412d1c68e1f4dc4821eaf24178361b312e27a..557bd6ae812e44e88efa90511dbbd767c52e5895 100644 (file)
--- a/cache.h
+++ b/cache.h
@@ -294,6 +294,7 @@ struct index_state {
                 initialized : 1;
        struct hashmap name_hash;
        struct hashmap dir_hash;
+       unsigned char sha1[20];
 };
 
 extern struct index_state the_index;
@@ -1337,6 +1338,8 @@ extern void fsync_or_die(int fd, const char *);
 
 extern ssize_t read_in_full(int fd, void *buf, size_t count);
 extern ssize_t write_in_full(int fd, const void *buf, size_t count);
+extern ssize_t pread_in_full(int fd, void *buf, size_t count, off_t offset);
+
 static inline ssize_t write_str_in_full(int fd, const char *str)
 {
        return write_in_full(fd, str, strlen(str));