summaryrefslogtreecommitdiff
path: root/cache.h
diff options
context:
space:
mode:
authorNguyễn Thái Ngọc Duy <pclouds@gmail.com>2014-06-13 12:19:27 (GMT)
committerJunio C Hamano <gitster@pobox.com>2014-06-13 18:49:38 (GMT)
commite636a7b4d0304608fe063ffcbbaf99e46f23dbea (patch)
treeb49b7a71aa55fe85073c4fb4813581e4d9008315 /cache.h
parentad837d9ef9d555ab5077767c8672ff48c6cb562b (diff)
downloadgit-e636a7b4d0304608fe063ffcbbaf99e46f23dbea.zip
git-e636a7b4d0304608fe063ffcbbaf99e46f23dbea.tar.gz
git-e636a7b4d0304608fe063ffcbbaf99e46f23dbea.tar.bz2
read-cache: be specific what part of the index has changed
cache entry additions, removals and modifications are separated out. The rest of changes are still in the catch-all flag SOMETHING_CHANGED, which would be more specific later. Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'cache.h')
-rw-r--r--cache.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/cache.h b/cache.h
index 57ad318..31d4541 100644
--- a/cache.h
+++ b/cache.h
@@ -268,6 +268,11 @@ static inline unsigned int canon_mode(unsigned int mode)
#define cache_entry_size(len) (offsetof(struct cache_entry,name) + (len) + 1)
+#define SOMETHING_CHANGED (1 << 0) /* unclassified changes go here */
+#define CE_ENTRY_CHANGED (1 << 1)
+#define CE_ENTRY_REMOVED (1 << 2)
+#define CE_ENTRY_ADDED (1 << 3)
+
struct index_state {
struct cache_entry **cache;
unsigned int version;