Fix "Compare with Previous" in history view and commit editor outline
commitd3a2f47f1aeba79b76d8929bd26c1828a9724e07
authorThomas Wolf <thomas.wolf@paranor.ch>
Sun, 8 Jul 2018 15:07:50 +0000 (8 17:07 +0200)
committerThomas Wolf <thomas.wolf@paranor.ch>
Mon, 16 Jul 2018 16:34:15 +0000 (16 12:34 -0400)
treed8d317d926cae3e8d02aa1146d2742edb121fd44
parent0da9aa76e5fb1f2af437d9b21f87bb66f0e15c96
Fix "Compare with Previous" in history view and commit editor outline

Enable or include the command only if there _is_ a previous revision
to compare to (i.e., only if the diff is not an addition).

Also fix the comparison itself to work for renames, too.

Bug: 536799
Change-Id: Ia2c0a706d1bac2f67fad4dbe686cd3e0d9d013d8
Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/commit/DiffEditorOutlinePage.java
org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/commit/DiffViewer.java
org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/history/CommitFileDiffViewer.java