Thread (1 message) 1 message, 1 author, 2016-06-15

Re: remove_duplicates() in builtin/fetch-pack.c is O(N^2)

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:53:52

Jeff King [off-list ref] writes:
I don't think there is any reason we can't sort the list of heads, and
then we can get rid of the duplicates with an O(n) traversal, like the
(largely untested) patch below.
Yeah, I think the only case the order matters in fetch is the traditional
"when multiple non-glob fetch refspecs are configured, only merge the
first one" logic, but it kicks in a much higher layer and the order in
this list should not have any effect on it.

Thanks.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help