Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Wolf2021-12-26 14:54:37 +0000
committerThomas Wolf2021-12-26 14:55:32 +0000
commit1c689d18c466e0f77d22f5c396f529d41c70c77b (patch)
tree6bf9744d247f6e173e8dc3429dd7c4e62bdd4b29
parent2e5110eda0d1a997f2bba4e7f96e7c5224e55697 (diff)
parentfd612a12821910f7fbfca88e2f9b0b955e2845f0 (diff)
downloadjgit-1c689d18c466e0f77d22f5c396f529d41c70c77b.tar.gz
jgit-1c689d18c466e0f77d22f5c396f529d41c70c77b.tar.xz
jgit-1c689d18c466e0f77d22f5c396f529d41c70c77b.zip
Merge branch 'stable-5.5' into stable-5.6
* stable-5.5: Revert "RefDirectory.scanRef: Re-use file existence check done in snapshot creation" Change-Id: I2622f1d384a88a556ba9d88f0d08a37af69e530c 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 e4ee53e0a1..93158f61da 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
@@ -440,15 +440,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 ae8fe0f562..7fdf8bf64d 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
@@ -1122,10 +1122,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