aboutsummaryrefslogtreecommitdiff
path: root/cache.h
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@ppc970.osdl.org>2005-04-09 12:09:27 -0700
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-04-09 12:09:27 -0700
commit197ee8c97076ee784db9f4b5a9294e86f42d068c (patch)
treeccba05512dc3b5f46c5fd5caadb40ce79ffb944b /cache.h
parent8d3af1d53255ac36494492720ebb83e932b0c0bc (diff)
downloadgit-197ee8c97076ee784db9f4b5a9294e86f42d068c.tar.gz
git-197ee8c97076ee784db9f4b5a9294e86f42d068c.tar.xz
Make "write_cache()" and friends available as generic routines.
This is needed for the change to make "read-tree" just read into the cache (and then you do a "checkout-cache" to update your current dir contents).
Diffstat (limited to 'cache.h')
-rw-r--r--cache.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/cache.h b/cache.h
index 0038e8b8e..2581117a1 100644
--- a/cache.h
+++ b/cache.h
@@ -73,7 +73,10 @@ unsigned int active_nr, active_alloc;
/* Initialize and use the cache information */
extern int read_cache(void);
+extern int write_cache(int newfd, struct cache_entry **cache, int entries);
extern int cache_name_pos(const char *name, int namelen);
+extern int add_cache_entry(struct cache_entry *ce);
+extern int remove_file_from_cache(char *path);
extern int cache_match_stat(struct cache_entry *ce, struct stat *st);
#define MTIME_CHANGED 0x0001
@@ -97,8 +100,8 @@ extern int write_sha1_file(char *buf, unsigned len);
extern int check_sha1_signature(unsigned char *sha1, void *buf, unsigned long size);
/* Convert to/from hex/sha1 representation */
-extern int get_sha1_hex(char *hex, unsigned char *sha1);
-extern char *sha1_to_hex(unsigned char *sha1); /* static buffer! */
+extern int get_sha1_hex(const char *hex, unsigned char *sha1);
+extern char *sha1_to_hex(const unsigned char *sha1); /* static buffer result! */
/* General helper functions */
extern void usage(const char *err);