aboutsummaryrefslogtreecommitdiffstats
path: root/cache.h
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@ppc970.osdl.org>2005-04-10 11:32:54 -0700
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-04-10 11:32:54 -0700
commit121481abf8d752ef871821d4ab9a3747595d86ae (patch)
tree6722a6e40e1edeeec7cd4c527a16a51553074130 /cache.h
parentd6d3f9d0125a7215f3cdc2600b2307ca55b69536 (diff)
downloadgit-121481abf8d752ef871821d4ab9a3747595d86ae.tar.gz
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.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/cache.h b/cache.h
index 497a05b8fa..1e006bfa56 100644
--- a/cache.h
+++ b/cache.h
@@ -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 */