commit | 95ea1c1123c590733cf3dc06ab571d6e0ce718b5 | [log] [tgz] |
---|---|---|
author | Thomas Wolf <thomas.wolf@paranor.ch> | Sun Dec 26 15:57:59 2021 +0100 |
committer | Thomas Wolf <thomas.wolf@paranor.ch> | Sun Dec 26 15:58:28 2021 +0100 |
tree | 7dc07d5ca4325fc14c2024fc2a67691b4f33d560 | |
parent | 70b894da19caf1429c00375f8f730725d8958f13 [diff] | |
parent | 9fd632b0e444a0efa8535c6c5347284931b6c926 [diff] |
Merge branch 'stable-5.8' into stable-5.9 * stable-5.8: Revert "RefDirectory.scanRef: Re-use file existence check done in snapshot creation" Change-Id: I88a629e571fec5a9820114ebf5765b5d94a276bd 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 d7f6ef3..87d6a3a 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 @@ 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 @@ 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) {