| commit | 4cc21ccd3d1cd2374c4af3e164b8daef81be4505 | [log] [tgz] |
|---|---|---|
| author | Thomas Wolf <thomas.wolf@paranor.ch> | Sun Dec 26 15:52:23 2021 +0100 |
| committer | Thomas Wolf <thomas.wolf@paranor.ch> | Sun Dec 26 15:53:17 2021 +0100 |
| tree | 72643c8410e0245d4f6def0010ee7f0469e0b5af | |
| parent | 7ae2ee300a37a8f1515df3b989a293827702f169 [diff] | |
| parent | 7edb062d8c3d6375c25463d43b5b0ade8a7778ee [diff] |
Merge branch 'stable-5.3' into stable-5.4 * stable-5.3: Revert "RefDirectory.scanRef: Re-use file existence check done in snapshot creation" Change-Id: I52a57a17abe60e30e3d7615f8cb4d0c5e6aebd9b 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 6cb8a19..8cc9383 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
@@ -1124,10 +1124,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) {