Files
gerrit/gerrit-acceptance-tests
Alice Kober-Sotzek a5504b0ca0 Fix bug in computation of hunks due to rebase
Combining the optimization which omits files from the diff result
containing only hunks due to rebase with the recursive calling of the
diff computation didn't work well. The logic assumed that all
differences between the parent commits were returned. Due to the
optimization, only some of them were returned and hence only some
hunks due to rebase could be marked.

As the optimization was only applied under specific circumstances,
this issue didn't occur for every diff between patch sets. In
particular, it was observable when a change was based on another change.

To resolve this issue, a parameter is introduced which influences
whether optimizations might be applied. All code paths from external
calls continue to apply those optimizations if applicable. When the
differences between parent commits is computed for the hunks due to
rebase, the unmodified differences between their trees is explicitly
requested. As the recursion is thus cut short, the expensive call to
RevWalk#isMergedInto can be removed from the check which determines
whether the edits due to rebase are computed.

Even though the DiffSummaryCache is supposed to be fairly independent
from changes in PatchList and PatchListKey, its implementation is
coupled to them. As the change in the diffing logic shouldn't
influence the DiffSummaryCache, this change tries to work around it.

Change-Id: I9bf31dec18d6dd357c17c640fa0a940808e97269
2017-06-14 17:19:37 +02:00
..