On 8/22/2019 12:26 PM, SZEDER Gábor wrote:
> On Thu, Aug 22, 2019 at 09:01:44AM -0700, Junio C Hamano wrote:
>> SZEDER Gábor <szeder....@gmail.com> writes:
>>
>>> Well, that fruit hung much lower than I though, just look at the size
>>> of the WIP patch below.  I just hope that there are no unexpected
>>> surprises, but FWIW it produces the exact same output for all files up
>>> to 't/t5515' in v2.23.0 as the previous patch.
>>>
>>> Can't wait to see how it fares with that evil Windows path :)
>>>
>>>   --- >8 ---
>>>
>>> Subject: [PATCH 3/2] WIP line-log: stop diff-ing after first TREESAME merge 
>>> parent
>>
>> A quick question.  That we need "stop diffing after first treesame"
>> patch in the first place means we have always been attempting to
>> follow all the parents of a merge?
> 
> To follow, no.
> 
> But there are two subsequent loops: the first loop computed the diffs
> between the merge and each of its parents, while the second processed
> those diffs, and returned as soon as it found a treesame parent,
> without following the others.
> 
> This patch unified those two loops so it computes the diff with the
> first parent, and then processes that diff right away, and returns if
> treesame, thereby avoding diffing the remaining parents.

The change you've proposed could be made a bit better in the following
way: first look for a treesame parent by computing the diffs without
rename detection. Re-enable rename detection only if no treesame parent
is found.

That would be sure to avoid the rename detection even if the merge has
a treesame second parent.

Thanks,
-Stolee

Reply via email to