| commit | f86d82fc30cd2cc11ca41947f82cc376f94e350d | [log] [tgz] |
|---|---|---|
| author | Thomas Wolf <thomas.wolf@paranor.ch> | Sun Dec 26 16:02:06 2021 +0100 |
| committer | Thomas Wolf <thomas.wolf@paranor.ch> | Sun Dec 26 16:02:35 2021 +0100 |
| tree | d525390d2167fdc5f032e86cbe3803e568c00047 | |
| parent | 1cffba4385b423c5a6958de06a80b7bf99aa6c1e [diff] | |
| parent | 5f8c593bb62cf562c05cde04acb747bdf2e75b34 [diff] |
Merge branch 'stable-5.11' into stable-5.12 * stable-5.11: Revert "RefDirectory.scanRef: Re-use file existence check done in snapshot creation" Change-Id: Ib80336a42e22da729b9db1e573772504cc0a3e77 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) {