Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlex Riesen <raa.lkml@gmail.com>2007-01-04 13:22:47 +0300
committerJunio C Hamano <junkio@cox.net>2007-01-11 01:45:20 +0300
commitf5184380f08c814535e7bda374e403596eef90a3 (patch)
treeebf850c18f995e683eababbc7ea412db921c8438 /merge-recursive.c
parent2a3a3c247e7f1f257e9c6762e48b98f08a30011a (diff)
Speed-up recursive by flushing index only once for all entries
The merge-recursive implementation in C inherited the invariant that the on-file index file is written out and later read back after any index operations and writing trees from the original Python implementation. But it was only because the original implementation worked at the scripting level. There is no need to write out the index file after handling every path. Signed-off-by: Alex Riesen <raa.lkml@gmail.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 'merge-recursive.c')
-rw-r--r--merge-recursive.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/merge-recursive.c b/merge-recursive.c
index 87a27e0379..aab4c34588 100644
--- a/merge-recursive.c
+++ b/merge-recursive.c
@@ -954,8 +954,6 @@ static int process_renames(struct path_list *a_renames,
path_list_clear(&a_by_dst, 0);
path_list_clear(&b_by_dst, 0);
- if (cache_dirty)
- flush_cache();
return clean_merge;
}
@@ -1083,9 +1081,6 @@ static int process_entry(const char *path, struct stage_data *entry,
} else
die("Fatal merge failure, shouldn't happen.");
- if (cache_dirty)
- flush_cache();
-
return clean_merge;
}
@@ -1133,6 +1128,8 @@ static int merge_trees(struct tree *head,
if (!process_entry(path, e, branch1, branch2))
clean = 0;
}
+ if (cache_dirty)
+ flush_cache();
path_list_clear(re_merge, 0);
path_list_clear(re_head, 0);