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 <>
 read-cache.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/read-cache.c b/read-cache.c
index 90a3f09..52a27b3 100644
--- a/read-cache.c
+++ b/read-cache.c
@@ -38,7 +38,8 @@ static struct cache_entry *refresh_cache_entry(struct 
cache_entry *ce,
 #define CACHE_EXT_LINK 0x6c696e6b        /* "link" */
 /* changes that can be kept in $GIT_DIR/index (basically all extensions) */
+                CE_ENTRY_ADDED)
 struct index_state the_index;
 static const char *alternate_index_output;

To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to
More majordomo info at

Reply via email to