summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Wolf <thomas.wolf@paranor.ch>2021-12-26 16:01:08 +0100
committerThomas Wolf <thomas.wolf@paranor.ch>2021-12-26 16:01:49 +0100
commit5f8c593bb62cf562c05cde04acb747bdf2e75b34 (patch)
treed4ba754dba73655ee079d06253da69bfa08fc2a9
parente14b25f2400da21aac1f113a8d2983e84478ea34 (diff)
parent8a9b4972b42d65af0f859ea5d5b3447677bc2992 (diff)
downloadjgit-5f8c593bb62cf562c05cde04acb747bdf2e75b34.tar.gz
jgit-5f8c593bb62cf562c05cde04acb747bdf2e75b34.zip
Merge branch 'stable-5.10' into stable-5.11
* stable-5.10: Revert "RefDirectory.scanRef: Re-use file existence check done in snapshot creation" Change-Id: I9e79ea2a0c554a184e4ce3b13e375eac8b7a4ac5 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) {