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>
This commit is contained in:
committed by
Junio C Hamano
parent
ef9c4dc3b6
commit
fc65b00da7
@ -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;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user