summaryrefslogtreecommitdiff
path: root/cache.h
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@ppc970.osdl.org>2005-04-16 05:51:44 (GMT)
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-04-16 05:51:44 (GMT)
commit95fd5bf82ae28da47dcbf8e6e4570e64d71dc532 (patch)
tree192f84588c8e47a2d8ca3d0c6e50641b7a2491b8 /cache.h
parentc347ea5d6fc6bae6b6ea3196013c4df7ec4406a8 (diff)
downloadgit-95fd5bf82ae28da47dcbf8e6e4570e64d71dc532.zip
git-95fd5bf82ae28da47dcbf8e6e4570e64d71dc532.tar.gz
git-95fd5bf82ae28da47dcbf8e6e4570e64d71dc532.tar.bz2
Make cache entry comparison take the new "state" flag into account.
This is what allows us to have multiple states of the same file in the index, and what makes it always sort correctly.
Diffstat (limited to 'cache.h')
-rw-r--r--cache.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/cache.h b/cache.h
index bce48b0..cc8f686 100644
--- a/cache.h
+++ b/cache.h
@@ -63,9 +63,10 @@ struct cache_entry {
char name[0];
};
-#define CE_NAMEMASK (0x0fff)
-#define CE_STAGE1 (0x1000)
-#define CE_STAGE2 (0x2000)
+#define CE_NAMEMASK (0x0fff)
+#define CE_STAGEMASK (0x3000)
+
+#define create_ce_flags(len, stage) ((len) | ((stage) << 12))
const char *sha1_file_directory;
struct cache_entry **active_cache;