| commit | f2d4783c5256b8ad925aa548c70d53d0ec1d88ce | [log] [tgz] |
|---|---|---|
| author | Thomas Wolf <thomas.wolf@paranor.ch> | Sun Dec 26 15:49:06 2021 +0100 |
| committer | Thomas Wolf <thomas.wolf@paranor.ch> | Sun Dec 26 15:50:42 2021 +0100 |
| tree | 811667a34b973cd5d9381a66599f0858e5f7fc78 | |
| parent | f8f4357d638271c5fdc5b9569bc494f894b91a59 [diff] | |
| parent | 7828ef349cfb671cf9673d766a420c032d7ffb45 [diff] |
Merge branch 'stable-5.1' into stable-5.2 * stable-5.1: Revert "RefDirectory.scanRef: Re-use file existence check done in snapshot creation" Change-Id: I625667c2718ab31ae7df907c3dd6024a933913b8 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 654e98d..487ae06 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
@@ -439,15 +439,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 c34be9c..0b8e079 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
@@ -1103,10 +1103,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) {