Re: [PATCH v7 17/31] merge-recursive: add a new hashmap for storing directory renames

2018-02-05 Thread Elijah Newren
On Mon, Feb 5, 2018 at 11:44 AM, Stefan Beller wrote: >>> Having a stringlist of potentially new dirs sounds like the algorithm is >>> at least n^2, but how do I know? I'll read on. >> >> Yes, I suppose it's technically n^2, but n is expected to be O(1). >> While one can

Re: [PATCH v7 17/31] merge-recursive: add a new hashmap for storing directory renames

2018-02-05 Thread Junio C Hamano
Johannes Sixt writes: > Am 03.02.2018 um 22:34 schrieb Elijah Newren: >> If anyone can find an >> example of a real world open source repository (linux, webkit, git, >> etc.) with a merge where n is greater than about 10, I'll be >> surprised. > > git rev-list --parents --merges

Re: [PATCH v7 17/31] merge-recursive: add a new hashmap for storing directory renames

2018-02-05 Thread Stefan Beller
>> Having a stringlist of potentially new dirs sounds like the algorithm is >> at least n^2, but how do I know? I'll read on. > > Yes, I suppose it's technically n^2, but n is expected to be O(1). > While one can trivially construct a case making n arbitrarily large, > statistically for real world

Re: [PATCH v7 17/31] merge-recursive: add a new hashmap for storing directory renames

2018-02-05 Thread Elijah Newren
// Re-sending because of bounce On Sun, Feb 4, 2018 at 12:54 AM, Johannes Sixt wrote: > Am 03.02.2018 um 22:34 schrieb Elijah Newren: >> If anyone can find an >> example of a real world open source repository (linux, webkit, git, >> etc.) with a merge where n is greater than

Re: [PATCH v7 17/31] merge-recursive: add a new hashmap for storing directory renames

2018-02-04 Thread Johannes Sixt
Am 03.02.2018 um 22:34 schrieb Elijah Newren: > If anyone can find an > example of a real world open source repository (linux, webkit, git, > etc.) with a merge where n is greater than about 10, I'll be > surprised. git rev-list --parents --merges master | grep " .* .* .* .* .* .* .* .* .* .* "

Re: [PATCH v7 17/31] merge-recursive: add a new hashmap for storing directory renames

2018-02-03 Thread Elijah Newren
On Fri, Feb 2, 2018 at 4:26 PM, Stefan Beller wrote: > On Tue, Jan 30, 2018 at 3:25 PM, Elijah Newren wrote: >> +static void dir_rename_init(struct hashmap *map) >> +{ >> + hashmap_init(map, (hashmap_cmp_fn) dir_rename_cmp, NULL, 0); > > See

Re: [PATCH v7 17/31] merge-recursive: add a new hashmap for storing directory renames

2018-02-02 Thread Stefan Beller
On Tue, Jan 30, 2018 at 3:25 PM, Elijah Newren wrote: > This just adds dir_rename_entry and the associated functions; code using > these will be added in subsequent commits. > > Signed-off-by: Elijah Newren > --- > merge-recursive.c | 35