diff options
author | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-04-09 12:09:27 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-04-09 12:09:27 -0700 |
commit | 197ee8c97076ee784db9f4b5a9294e86f42d068c (patch) | |
tree | ccba05512dc3b5f46c5fd5caadb40ce79ffb944b /cache.h | |
parent | 8d3af1d53255ac36494492720ebb83e932b0c0bc (diff) | |
download | git-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.h | 7 |
1 files changed, 5 insertions, 2 deletions
@@ -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); |