summaryrefslogtreecommitdiff
path: root/merge-recursive.h
diff options
context:
space:
mode:
authorKevin Willford <kewillf@microsoft.com>2017-09-07 16:25:56 (GMT)
committerJunio C Hamano <gitster@pobox.com>2017-09-08 01:36:16 (GMT)
commitfc65b00da7ebfc96d3b93a59ee99f820deb5c93e (patch)
tree2e72a1c37a3bc4dc0240f34b77f78c30acbc8e03 /merge-recursive.h
parentef9c4dc3b6a4feeabd28e9576260e077c607159e (diff)
downloadgit-fc65b00da7ebfc96d3b93a59ee99f820deb5c93e.zip
git-fc65b00da7ebfc96d3b93a59ee99f820deb5c93e.tar.gz
git-fc65b00da7ebfc96d3b93a59ee99f820deb5c93e.tar.bz2
merge-recursive: change current file dir string_lists to hashmap
The code was using two string_lists, one for the directories and one for the files. The code never checks the lists independently so we should be able to only use one list. The string_list also is a O(log n) for lookup and insertion. Switching this to use a hashmap will give O(1) which will save some time when there are millions of paths that will be checked. Signed-off-by: Kevin Willford <kewillf@microsoft.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'merge-recursive.h')
-rw-r--r--merge-recursive.h3
1 files changed, 1 insertions, 2 deletions
diff --git a/merge-recursive.h b/merge-recursive.h
index 735343b..80d69d1 100644
--- a/merge-recursive.h
+++ b/merge-recursive.h
@@ -25,8 +25,7 @@ struct merge_options {
int show_rename_progress;
int call_depth;
struct strbuf obuf;
- struct string_list current_file_set;
- struct string_list current_directory_set;
+ struct hashmap current_file_dir_set;
struct string_list df_conflict_file_set;
};