Re: [PATCH 1/2] diffcore-rename: no point trying to find a match better than exact

2 messages, 2 authors, 2021-02-03 · open the first message on its own page

Re: [PATCH 1/2] diffcore-rename: no point trying to find a match better than exact

From: Junio C Hamano <hidden>
Date: 2021-02-03 18:47:23

Derrick Stolee [off-list ref] writes:
quoted
 	/* All done? */
-	if (!num_destinations)
+	if (!num_destinations || !num_sources)
 		goto cleanup;
And add an extra quit condition which is very possible to hit.
Is it only hit when every "delete" is actually a rename?
When every delete is actually an unmodified exact rename, I think.
If this simple change gives us good performance gain, that is
superb.

Nicely done.

Re: [PATCH 1/2] diffcore-rename: no point trying to find a match better than exact

From: Elijah Newren <hidden>
Date: 2021-02-03 19:11:52

On Wed, Feb 3, 2021 at 10:46 AM Junio C Hamano [off-list ref] wrote:
Derrick Stolee [off-list ref] writes:
quoted
quoted
     /* All done? */
-    if (!num_destinations)
+    if (!num_destinations || !num_sources)
             goto cleanup;
And add an extra quit condition which is very possible to hit.
Is it only hit when every "delete" is actually a rename?
When every delete is actually an unmodified exact rename, I think.
Yes, exactly.
If this simple change gives us good performance gain, that is
superb.

Nicely done.
Thanks.

I probably should have separated this from the speculative
not-quite-working changes that weren't ready yet and pushed just it
sooner.[1]  But I kinda wanted to get all the performance changes
together, and...well, all the other performance changes took a while
to complete (especially given multiple starts and stops).

[1] https://lore.kernel.org/git/20171110222156.23221-2-newren@gmail.com/
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help