summaryrefslogtreecommitdiff
path: root/cache.h
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@ppc970.osdl.org>2005-04-09 16:48:20 (GMT)
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-04-09 16:48:20 (GMT)
commit734aab758cc2b9f5e2ed43375dbfec1b5bfde43b (patch)
tree6c8b42ad4851c05a0a093af5468bdcec6367b7e8 /cache.h
parenteb38c22f535c7c973f27b62845c5136c4be0ae49 (diff)
downloadgit-734aab758cc2b9f5e2ed43375dbfec1b5bfde43b.zip
git-734aab758cc2b9f5e2ed43375dbfec1b5bfde43b.tar.gz
git-734aab758cc2b9f5e2ed43375dbfec1b5bfde43b.tar.bz2
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.
Diffstat (limited to 'cache.h')
-rw-r--r--cache.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/cache.h b/cache.h
index a23ad51..0038e8b 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);