gerrit/gerrit-test-util
Alice Kober-Sotzek 264143d5b5 Fix exception due to duplicate keys in EditTransformer
As copies are treated as additions in the current version of JGit,
having multiple PatchListEntries referring to the same file path
didn't seem possible. However, when a file is renamed alongside
those copies, JGit identifies the copies as such.

The logic which transforms the edits from the parents' trees to the
children's trees assumed that one edit was only mapped to a
transformed edit. With the existence of copies, we need to map one
edit to several ones instead.

All in all, we compute the cross product of all possible combinations.
When computing a real diff between two trees, not all of them would
be present at the same time. As it seems difficult to figure out
exactly which edits are 'necessary' to keep, we rather keep all of
them for the moment and accept that we possibly waste some resources.

Change-Id: I6d57fb6a49b8dea58aab9565ac41301c7365159f
2017-07-17 11:35:11 +02:00
..
src/main/java/com/google/gerrit Fix exception due to duplicate keys in EditTransformer 2017-07-17 11:35:11 +02:00
BUCK Add unit tests for Comment.Range#isValid 2016-12-08 11:21:48 +01:00
BUILD Add unit tests for Comment.Range#isValid 2016-12-08 11:21:48 +01:00