summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2015-06-24 12:21:49 -0700
committerLibravatar Junio C Hamano <gitster@pobox.com>2015-06-24 12:21:49 -0700
commit6f59058e490fa72c09faa974addfeeb2868dc648 (patch)
treef39b9ccc3cb5d68437b30e1089007a7d72fae346
parentMerge branch 'mh/fsck-reflog-entries' (diff)
parentread-cache: fix untracked cache invalidation when split-index is used (diff)
downloadtgif-6f59058e490fa72c09faa974addfeeb2868dc648.tar.xz
Merge branch 'nd/untracked-cache'
Hotfix for the 'untracked-cache' topic that is already in 'master'. * nd/untracked-cache: read-cache: fix untracked cache invalidation when split-index is used
-rw-r--r--read-cache.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/read-cache.c b/read-cache.c
index 5dee4e2b7f..89dbc0837a 100644
--- a/read-cache.c
+++ b/read-cache.c
@@ -999,7 +999,8 @@ static int add_index_entry_with_check(struct index_state *istate, struct cache_e
}
pos = -pos-1;
- untracked_cache_add_to_index(istate, ce->name);
+ if (!(option & ADD_CACHE_KEEP_CACHE_TREE))
+ untracked_cache_add_to_index(istate, ce->name);
/*
* Inserting a merged entry ("stage 0") into the index