Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRobin Stocker2011-05-21 12:24:08 +0000
committerRobin Stocker2011-08-02 13:32:53 +0000
commit2c0033268db6462d096cd420c60ac4d8a590ffdc (patch)
treef7b932e475abe7833055226a397e09a02726431f /org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/actions
parentf2600be0293a3b502c5d2001e2341e586e7e258d (diff)
downloadegit-2c0033268db6462d096cd420c60ac4d8a590ffdc.tar.gz
egit-2c0033268db6462d096cd420c60ac4d8a590ffdc.tar.xz
egit-2c0033268db6462d096cd420c60ac4d8a590ffdc.zip
CompareWithIndexAction: Fix encoding of index element
The encoding should be the same as the IFile in the workspace, to not get an incorrect diff. Bug: 345160 Change-Id: I2d81ef9c1b3b6187aafac00a0018bc2d48c1a5eb Signed-off-by: Robin Stocker <robin@nibor.org>
Diffstat (limited to 'org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/actions')
-rw-r--r--org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/actions/CompareWithIndexActionHandler.java3
1 files changed, 2 insertions, 1 deletions
diff --git a/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/actions/CompareWithIndexActionHandler.java b/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/actions/CompareWithIndexActionHandler.java
index c59ce64188..728e8e744a 100644
--- a/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/actions/CompareWithIndexActionHandler.java
+++ b/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/actions/CompareWithIndexActionHandler.java
@@ -107,7 +107,8 @@ public class CompareWithIndexActionHandler extends RepositoryActionHandler {
}
IFileRevision nextFile = GitFileRevision.inIndex(repository, gitPath);
- final EditableRevision next = new EditableRevision(nextFile);
+ String encoding = CompareUtils.getResourceEncoding(baseFile);
+ final EditableRevision next = new EditableRevision(nextFile, encoding);
IContentChangeListener listener = new IContentChangeListener() {
public void contentChanged(IContentChangeNotifier source) {

Back to the top