aboutsummaryrefslogtreecommitdiffstats
path: root/org.eclipse.jgit
diff options
context:
space:
mode:
authorThomas Wolf <thomas.wolf@paranor.ch>2021-12-26 16:02:06 +0100
committerThomas Wolf <thomas.wolf@paranor.ch>2021-12-26 16:02:35 +0100
commitf86d82fc30cd2cc11ca41947f82cc376f94e350d (patch)
treed525390d2167fdc5f032e86cbe3803e568c00047 /org.eclipse.jgit
parent1cffba4385b423c5a6958de06a80b7bf99aa6c1e (diff)
parent5f8c593bb62cf562c05cde04acb747bdf2e75b34 (diff)
downloadjgit-f86d82fc30cd2cc11ca41947f82cc376f94e350d.tar.gz
jgit-f86d82fc30cd2cc11ca41947f82cc376f94e350d.zip
Merge branch 'stable-5.11' into stable-5.12
* stable-5.11: Revert "RefDirectory.scanRef: Re-use file existence check done in snapshot creation" Change-Id: Ib80336a42e22da729b9db1e573772504cc0a3e77 Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
Diffstat (limited to 'org.eclipse.jgit')
-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) {