Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Wolf2021-12-26 14:58:49 +0000
committerThomas Wolf2021-12-26 15:00:48 +0000
commit8a9b4972b42d65af0f859ea5d5b3447677bc2992 (patch)
tree13b6e2ba8b1687cd1878e8c90947e5972d46d4f7
parent8583b3c56c4bb644ee26436a4a3d867e0fb49202 (diff)
parent95ea1c1123c590733cf3dc06ab571d6e0ce718b5 (diff)
downloadjgit-8a9b4972b42d65af0f859ea5d5b3447677bc2992.tar.gz
jgit-8a9b4972b42d65af0f859ea5d5b3447677bc2992.tar.xz
jgit-8a9b4972b42d65af0f859ea5d5b3447677bc2992.zip
Merge branch 'stable-5.9' into stable-5.10
* stable-5.9: Revert "RefDirectory.scanRef: Re-use file existence check done in snapshot creation" Change-Id: I2a84c838a886d1d6383c34f50b418baa743c57b0 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 d7f6ef316d..87d6a3ae71 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
@@ -407,15 +407,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