Kevin Willford <kewillf@xxxxxxxxxxxxx> writes: > 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. > > Also cleaned up a memory leak and method where the return was not > being used. > > Signed-off-by: Kevin Willford <kewillf@xxxxxxxxxxxxx> > --- > merge-recursive.c | 76 ++++++++++++++++++++++++++++++++++++++++--------------- > merge-recursive.h | 3 +-- > 2 files changed, 57 insertions(+), 22 deletions(-) > > diff --git a/merge-recursive.c b/merge-recursive.c > index 1494ffdb82..ebfe01017f 100644 > --- a/merge-recursive.c > +++ b/merge-recursive.c > @@ -24,6 +24,31 @@ > #include "dir.h" > #include "submodule.h" > > +struct path_hashmap_entry { > + struct hashmap_entry; You seem to have lost the squash you privately agreed to that is needed in order to make it compile?