diff options
| author | Robin Stocker | 2011-05-21 12:11:49 +0000 |
|---|---|---|
| committer | Robin Stocker | 2011-05-21 12:35:17 +0000 |
| commit | 40738aa39ec3c6d0eda3de12e89ddc5f31f891ac (patch) | |
| tree | 161994a3895da3bb0b7630822ed610cc33c9a2d5 | |
| parent | f1949c2f8efc8ded4f843521c3f34696361d56a1 (diff) | |
| download | egit-40738aa39ec3c6d0eda3de12e89ddc5f31f891ac.tar.gz egit-40738aa39ec3c6d0eda3de12e89ddc5f31f891ac.tar.xz egit-40738aa39ec3c6d0eda3de12e89ddc5f31f891ac.zip | |
Use resource encoding in getFileRevisionTypedElement
This fixes problems in many compare actions when the workspace encoding
is different from the file encoding.
Bug: 345160
Change-Id: Ie26b68355d53456c1000afb51f15f12f5098e6be
Signed-off-by: Robin Stocker <robin@nibor.org>
| -rw-r--r-- | org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/CompareUtils.java | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/CompareUtils.java b/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/CompareUtils.java index ef2faacdbc..f6c16e9fa5 100644 --- a/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/CompareUtils.java +++ b/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/CompareUtils.java @@ -113,8 +113,10 @@ public class CompareUtils { try { IFileRevision nextFile = getFileRevision(gitPath, commit, db, blobId); - if (nextFile != null) - right = new FileRevisionTypedElement(nextFile); + if (nextFile != null) { + String encoding = getResourceEncoding(db, gitPath); + right = new FileRevisionTypedElement(nextFile, encoding); + } } catch (IOException e) { Activator.error(NLS.bind(UIText.GitHistoryPage_errorLookingUpPath, gitPath, commit.getId()), e); |
