Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[egit-dev] Compare with Previous Revision across renames

Hey Everybody,

A couple months ago I posted a change to have the Compare With -> Previous Revision work
when run against a renamed file [1].

Before the fix the right-side of the compare editor would always be empty when running this
action on a file whose last change was a rename.

The fix was to use a RenameCallback and track the path if it changes during the RevWalk and
use the changed path instead of the original path when looking up the blob in the previous
commit.

Stefan shortly after discovered that the RenameCallback is called for all renames that have
ever occurred to the file regardless of how many times next() is called on the RevWalk [2].

So the initial fix works for certain cases but will fail for many cases when the RenameCallback
is fired for paths that where changed in commits prior to the commit used through calling
RevWalk.next().

I have targeted a follow up fix to stable-2.0 that uses a RenameDetector directly to ensure
a previous renamed path isn't used that is in the commit history past the previous commit [3].

I would like to ideally get this change into stable-2.0 or revert the initial change.

Thanks,
Kevin

[1] https://git.eclipse.org/r/#/c/5392/
[2] https://git.eclipse.org/r/#/c/5416/
[3] https://git.eclipse.org/r/#/c/6206/

Back to the top