From 734aab758cc2b9f5e2ed43375dbfec1b5bfde43b Mon Sep 17 00:00:00 2001 From: Linus Torvalds Date: Sat, 9 Apr 2005 09:48:20 -0700 Subject: Make the cache stat information comparator public. Like the cache filename finder, it's a generically useful function, rather than something specific to the current "show-diff" thing. --- cache.h | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'cache.h') diff --git a/cache.h b/cache.h index a23ad51ae0..0038e8b8e0 100644 --- a/cache.h +++ b/cache.h @@ -71,9 +71,17 @@ unsigned int active_nr, active_alloc; #define alloc_nr(x) (((x)+16)*3/2) -/* Initialize the cache information */ +/* Initialize and use the cache information */ extern int read_cache(void); extern int cache_name_pos(const char *name, int namelen); +extern int cache_match_stat(struct cache_entry *ce, struct stat *st); + +#define MTIME_CHANGED 0x0001 +#define CTIME_CHANGED 0x0002 +#define OWNER_CHANGED 0x0004 +#define MODE_CHANGED 0x0008 +#define INODE_CHANGED 0x0010 +#define DATA_CHANGED 0x0020 /* Return a statically allocated filename matching the sha1 signature */ extern char *sha1_file_name(unsigned char *sha1); -- cgit v1.3