Fix symlink merge with stage 2 as input
commitf67f412163a8fe3d844c6062a78745d3393abcb2
authorThomas Wolf <twolf@apache.org>
Wed, 28 Sep 2022 17:26:04 +0000 (28 19:26 +0200)
committerThomas Wolf <twolf@apache.org>
Wed, 28 Sep 2022 20:24:26 +0000 (28 22:24 +0200)
treef0465855dc8a4dc92525a8cc59321a62ce125c35
parentec2be8548a56e4f088d06ec30dfe4fe79d1bc4dd
Fix symlink merge with stage 2 as input

Fix resolving a link/link merge conflict with stage 2 (previous HEAD)
as input. In such a conflict, the working tree file will be a symlink.
(In file/link or link/file conflicts, the working tree will contain the
file.)

Bring back the LocationEditableRevision. We cannot create a hidden
IResource for a broken symlink, and if the symlink has a valid target,
the IResource might update the target in the end. We have to handle
this specially.

Luckily, the reason for not using LocationEditableRevision anymore given
in commit 2824d518 (JDT logging exceptions and not initializing the
merge viewer fully) is irrelevant for symlinks, as those should not use
a Java document provider anyway.

Change-Id: I4d89dc489894b71b3289bd01b1c768f35bf0a238
Signed-off-by: Thomas Wolf <twolf@apache.org>
org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/merge/GitMergeEditorInput.java
org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/revision/LocationEditableRevision.java [new file with mode: 0644]