summaryrefslogtreecommitdiffstats
path: root/org.eclipse.jgit
diff options
context:
space:
mode:
authorThomas Wolf <thomas.wolf@paranor.ch>2021-12-26 15:53:38 +0100
committerThomas Wolf <thomas.wolf@paranor.ch>2021-12-26 15:54:12 +0100
commitfd612a12821910f7fbfca88e2f9b0b955e2845f0 (patch)
treeedff7a391871003735fb774e6cf940c63754faa7 /org.eclipse.jgit
parent8924b14d3afdb223d6e46e38e27a4cba25b26f23 (diff)
parent4cc21ccd3d1cd2374c4af3e164b8daef81be4505 (diff)
downloadjgit-fd612a12821910f7fbfca88e2f9b0b955e2845f0.tar.gz
jgit-fd612a12821910f7fbfca88e2f9b0b955e2845f0.zip
Merge branch 'stable-5.4' into stable-5.5
* stable-5.4: Revert "RefDirectory.scanRef: Re-use file existence check done in snapshot creation" Change-Id: Ia1665dd92ccc3811a6116f41421a05aca10fc6eb 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 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 6cb8a19f81..8cc9383fc6 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
@@ -1124,10 +1124,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) {