summaryrefslogtreecommitdiff
path: root/builtin
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2015-09-03 19:18:02 -0700
committerLibravatar Junio C Hamano <gitster@pobox.com>2015-09-03 19:18:02 -0700
commit311e5ce2cc06f7bb640be62f487e5b3d14bbb9a0 (patch)
tree26d97cd3ac03658ae61e42bcf267468f8fb0b9bc /builtin
parentMerge branch 'rs/archive-zip-many' into maint (diff)
parentcommit: don't rewrite shared index unnecessarily (diff)
downloadtgif-311e5ce2cc06f7bb640be62f487e5b3d14bbb9a0.tar.xz
Merge branch 'dt/commit-preserve-base-index-upon-opportunistic-cache-tree-update' into maint
When re-priming the cache-tree opportunistically while committing the in-core index as-is, we mistakenly invalidated the in-core index too aggressively, causing the experimental split-index code to unnecessarily rewrite the on-disk index file(s). * dt/commit-preserve-base-index-upon-opportunistic-cache-tree-update: commit: don't rewrite shared index unnecessarily
Diffstat (limited to 'builtin')
-rw-r--r--builtin/commit.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/builtin/commit.c b/builtin/commit.c
index 254477fd1d..1692620e25 100644
--- a/builtin/commit.c
+++ b/builtin/commit.c
@@ -404,10 +404,8 @@ static const char *prepare_index(int argc, const char **argv, const char *prefix
hold_locked_index(&index_lock, 1);
refresh_cache_or_die(refresh_flags);
if (active_cache_changed
- || !cache_tree_fully_valid(active_cache_tree)) {
+ || !cache_tree_fully_valid(active_cache_tree))
update_main_cache_tree(WRITE_TREE_SILENT);
- active_cache_changed = 1;
- }
if (active_cache_changed) {
if (write_locked_index(&the_index, &index_lock,
COMMIT_LOCK))