diff options
author | Elijah Newren <newren@gmail.com> | 2021-06-22 08:04:39 +0000 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2021-06-28 07:58:25 -0700 |
commit | d331dd3b0c829fe9019f0113a095ed95bc06f227 (patch) | |
tree | 0ecfb755c3662041ec5a8087c237c31afdd546c5 /.tsan-suppressions | |
parent | t6421: add tests checking for excessive object downloads during merge (diff) | |
download | tgif-d331dd3b0c829fe9019f0113a095ed95bc06f227.tar.xz |
diffcore-rename: allow different missing_object_cb functions
estimate_similarity() was setting up a diff_populate_filespec_options
every time it was called, requiring the caller of estimate_similarity()
to pass in some data needed to set up this option. Currently the needed
data consisted of a single variable (skip_unmodified), but we want to
also have the different estimate_similarity() callsites start using
different missing_object_cb functions as well. Rather than also passing
that data in, just have the caller pass in the whole
diff_populate_filespec_options, and reduce the number of times we need to
set it up.
As a side note, this also drops the number of calls to
has_promisor_remote() dramatically. If L is the number of basename
paths to compare, M is the number of inexact sources, and N is the
number of inexact destinations, then the number of calls to
has_promisor_remote() drops from L+M*N down to at most 2 -- one for each
of the sites that calls estimate_similarity(). has_promisor_remote() is
a very fast function so this almost certainly has no measurable
performance impact, but it seems cleaner to avoid calling that function
so many times.
Signed-off-by: Elijah Newren <newren@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to '.tsan-suppressions')
0 files changed, 0 insertions, 0 deletions