| commit | 41406e278fb69df1dbf4dcb9a82dcb03f2a8d5d7 | [log] [tgz] |
|---|---|---|
| author | Thomas Wolf <thomas.wolf@paranor.ch> | Sun Dec 26 16:02:51 2021 +0100 |
| committer | Thomas Wolf <thomas.wolf@paranor.ch> | Sun Dec 26 16:03:20 2021 +0100 |
| tree | bf6aa1500d409941e0413f6f971104bbc6b38535 | |
| parent | 3d7351ee50b2ef45613b2223856f31e5af1c7ca1 [diff] | |
| parent | f86d82fc30cd2cc11ca41947f82cc376f94e350d [diff] |
Merge branch 'stable-5.12' into stable-5.13 * stable-5.12: Revert "RefDirectory.scanRef: Re-use file existence check done in snapshot creation" Change-Id: I6576872cc0f5dd452252fa6e4526086cdee65c28 Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
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 5ab973f..6088c15 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 boolean equals(Object obj) { 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 2167262..07e3814 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 @@ LooseRef scanRef(LooseRef ref, String name) throws IOException { 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) {