diff options
author | Matthias Sohn <matthias.sohn@sap.com> | 2019-06-16 01:50:38 +0200 |
---|---|---|
committer | Matthias Sohn <matthias.sohn@sap.com> | 2019-08-08 14:41:16 +0200 |
commit | 400bfd66651ae02163a704114c3e58a1f5382a03 (patch) | |
tree | f2b2d2420e02d6dba1ab82376d84f06a959ee8aa | |
parent | 6370098e54e6d611e5db733862a321eefc1ab3c5 (diff) | |
download | jgit-400bfd66651ae02163a704114c3e58a1f5382a03.tar.gz jgit-400bfd66651ae02163a704114c3e58a1f5382a03.zip |
Repository: fix reference comparison of Files
Change-Id: Ib46ea2c0d5039c88b4fc59723135c503a8c950ce
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
-rw-r--r-- | org.eclipse.jgit/src/org/eclipse/jgit/lib/Repository.java | 3 |
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); } |