read-cache: mark new entries for split index

Make sure entry addition does not lead to unifying the index. We don't need to explicitly keep track of new entries. If ce->index is zero, they're new. Otherwise it's unlikely that they are new, but we'll do a thorough check later at writing time. Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Nguyễn Thái Ngọc Duy committed Jun 13, 2014 at 19:19 UTC e0cf0d7de28ee90e1668049e32802a8dbbcc2950
1 file changed +2 -1
read-cache.c
+2 -1
@@ -38,7 +38,8 @@ static struct cache_entry *refresh_cache_entry(struct cache_entry *ce,
38 #define CACHE_EXT_LINK 0x6c696e6b /* "link" */
39
40 /* changes that can be kept in $GIT_DIR/index (basically all extensions) */
41 -#define EXTMASK (RESOLVE_UNDO_CHANGED | CACHE_TREE_CHANGED)
41 +#define EXTMASK (RESOLVE_UNDO_CHANGED | CACHE_TREE_CHANGED | \
42 + CE_ENTRY_ADDED)
43
44 struct index_state the_index;
45 static const char *alternate_index_output;