aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/lib/Repository.java3
1 files changed, 2 insertions, 1 deletions
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/lib/Repository.java b/org.eclipse.jgit/src/org/eclipse/jgit/lib/Repository.java
index d53b0c926a..35e3c5a501 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/lib/Repository.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/lib/Repository.java
@@ -1541,8 +1541,9 @@ public abstract class Repository implements AutoCloseable {
!filePath.startsWith(workDirPath)) {
File absWd = workDir.isAbsolute() ? workDir : workDir.getAbsoluteFile();
File absFile = file.isAbsolute() ? file : file.getAbsoluteFile();
- if (absWd == workDir && absFile == file)
+ if (absWd.equals(workDir) && absFile.equals(file)) {
return ""; //$NON-NLS-1$
+ }
return stripWorkDir(absWd, absFile);
}