| commit | 1c689d18c466e0f77d22f5c396f529d41c70c77b | [log] [tgz] |
|---|---|---|
| author | Thomas Wolf <thomas.wolf@paranor.ch> | Sun Dec 26 15:54:37 2021 +0100 |
| committer | Thomas Wolf <thomas.wolf@paranor.ch> | Sun Dec 26 15:55:32 2021 +0100 |
| tree | 6bf9744d247f6e173e8dc3429dd7c4e62bdd4b29 | |
| parent | 2e5110eda0d1a997f2bba4e7f96e7c5224e55697 [diff] | |
| parent | fd612a12821910f7fbfca88e2f9b0b955e2845f0 [diff] |
Merge branch 'stable-5.5' into stable-5.6 * stable-5.5: Revert "RefDirectory.scanRef: Re-use file existence check done in snapshot creation" Change-Id: I2622f1d384a88a556ba9d88f0d08a37af69e530c 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 e4ee53e..93158f6 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
@@ -440,15 +440,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 ae8fe0f..7fdf8bf 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
@@ -1122,10 +1122,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) {