summaryrefslogtreecommitdiff
path: root/builtin/commit.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2015-09-01 23:31:29 (GMT)
committerJunio C Hamano <gitster@pobox.com>2015-09-01 23:31:29 (GMT)
commit81d0e33a225950b3837953572e4ace283341f762 (patch)
treeedcca9b75eb0ce9fbaace4ebe3c396b9ecdaaf7f /builtin/commit.c
parent0fb8e2423444e104004062ff34f6f6f594c0ff80 (diff)
parent475a34451f86d1b954c5da37f04ed044544cf6e4 (diff)
downloadgit-81d0e33a225950b3837953572e4ace283341f762.zip
git-81d0e33a225950b3837953572e4ace283341f762.tar.gz
git-81d0e33a225950b3837953572e4ace283341f762.tar.bz2
Merge branch 'dt/commit-preserve-base-index-upon-opportunistic-cache-tree-update'
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/commit.c')
-rw-r--r--builtin/commit.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/builtin/commit.c b/builtin/commit.c
index b37cb6c..63772d0 100644
--- a/builtin/commit.c
+++ b/builtin/commit.c
@@ -405,10 +405,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))