aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRobin Stocker2011-05-21 08:11:49 (EDT)
committerRobin Stocker2011-05-21 08:35:17 (EDT)
commit40738aa39ec3c6d0eda3de12e89ddc5f31f891ac (patch)
tree161994a3895da3bb0b7630822ed610cc33c9a2d5
parentf1949c2f8efc8ded4f843521c3f34696361d56a1 (diff)
downloadegit-40738aa39ec3c6d0eda3de12e89ddc5f31f891ac.zip
egit-40738aa39ec3c6d0eda3de12e89ddc5f31f891ac.tar.gz
egit-40738aa39ec3c6d0eda3de12e89ddc5f31f891ac.tar.bz2
Use resource encoding in getFileRevisionTypedElementrefs/changes/88/3488/1
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.java6
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 ef2faac..f6c16e9 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);