Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Wolf2021-12-26 15:02:51 +0000
committerThomas Wolf2021-12-26 15:03:20 +0000
commit41406e278fb69df1dbf4dcb9a82dcb03f2a8d5d7 (patch)
treebf6aa1500d409941e0413f6f971104bbc6b38535
parent3d7351ee50b2ef45613b2223856f31e5af1c7ca1 (diff)
parentf86d82fc30cd2cc11ca41947f82cc376f94e350d (diff)
downloadjgit-41406e278fb69df1dbf4dcb9a82dcb03f2a8d5d7.tar.gz
jgit-41406e278fb69df1dbf4dcb9a82dcb03f2a8d5d7.tar.xz
jgit-41406e278fb69df1dbf4dcb9a82dcb03f2a8d5d7.zip
Merge branch 'stable-5.12' into stable-5.13
* stable-5.12: Revert "RefDirectory.scanRef: Re-use file existence check done in snapshot creation" Change-Id: I6576872cc0f5dd452252fa6e4526086cdee65c28 Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/FileSnapshot.java9
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/RefDirectory.java4
2 files changed, 0 insertions, 13 deletions
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/FileSnapshot.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/FileSnapshot.java
index 5ab973f533..6088c152a1 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/FileSnapshot.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/FileSnapshot.java
@@ -420,15 +420,6 @@ public class FileSnapshot {
return equals(other);
}
- /**
- * Check if the file exists
- *
- * @return true if the file exists
- */
- public boolean fileExists() {
- return !MISSING_FILEKEY.equals(this.fileKey);
- }
-
/** {@inheritDoc} */
@Override
public int hashCode() {
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/RefDirectory.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/RefDirectory.java
index 2167262dd5..07e38147f7 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/RefDirectory.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/RefDirectory.java
@@ -1092,10 +1092,6 @@ public class RefDirectory extends RefDatabase {
final int limit = 4096;
final byte[] buf;
FileSnapshot otherSnapshot = FileSnapshot.save(path);
- if (!otherSnapshot.fileExists()) {
- return null;
- }
-
try {
buf = IO.readSome(path, limit);
} catch (FileNotFoundException noFile) {

Back to the top