diff options
author | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-04-10 11:32:54 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-04-10 11:32:54 -0700 |
commit | 121481abf8d752ef871821d4ab9a3747595d86ae (patch) | |
tree | 6722a6e40e1edeeec7cd4c527a16a51553074130 /cache.h | |
parent | d6d3f9d0125a7215f3cdc2600b2307ca55b69536 (diff) | |
download | git-121481abf8d752ef871821d4ab9a3747595d86ae.tar.gz git-121481abf8d752ef871821d4ab9a3747595d86ae.tar.xz |
Make "update-cache" a bit friendlier to use (and harder to mis-use).
It now requires the "--add" flag before you add any new files, and
a "--remove" file if you want to mark files for removal. And giving
it the "--refresh" flag makes it just update all the files that it
already knows about.
Diffstat (limited to 'cache.h')
-rw-r--r-- | cache.h | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -75,7 +75,7 @@ unsigned int active_nr, active_alloc; 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 add_cache_entry(struct cache_entry *ce, int ok_to_add); extern int remove_file_from_cache(char *path); extern int cache_match_stat(struct cache_entry *ce, struct stat *st); @@ -104,7 +104,7 @@ 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); +extern void usage(const char *err, ...); extern int cache_name_compare(const char *name1, int len1, const char *name2, int len2); #endif /* CACHE_H */ |