Skip to content

Commit

Permalink
read-cache: mark new entries for split index
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Nguyễn Thái Ngọc Duy authored and Junio C Hamano committed Jun 13, 2014
1 parent 5fc2fc8 commit e0cf0d7
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion read-cache.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) */
#define EXTMASK (RESOLVE_UNDO_CHANGED | CACHE_TREE_CHANGED)
#define EXTMASK (RESOLVE_UNDO_CHANGED | CACHE_TREE_CHANGED | \
CE_ENTRY_ADDED)

struct index_state the_index;
static const char *alternate_index_output;
Expand Down

0 comments on commit e0cf0d7

Please sign in to comment.