diff options
author | Thomas Wolf <thomas.wolf@paranor.ch> | 2021-12-26 15:55:52 +0100 |
---|---|---|
committer | Thomas Wolf <thomas.wolf@paranor.ch> | 2021-12-26 15:56:33 +0100 |
commit | d295294dbea40c126b3068cf571dda3005422292 (patch) | |
tree | e4b2847f4b98326f6e5238b3ccb7aa10abd72e8e | |
parent | 994434a1cac37d1569bbbbc13f363dff2a819071 (diff) | |
parent | 1c689d18c466e0f77d22f5c396f529d41c70c77b (diff) | |
download | jgit-d295294dbea40c126b3068cf571dda3005422292.tar.gz jgit-d295294dbea40c126b3068cf571dda3005422292.zip |
Merge branch 'stable-5.6' into stable-5.7
* stable-5.6:
Revert "RefDirectory.scanRef: Re-use file existence check done in snapshot creation"
Change-Id: I454622dae6eb95aedbd858e3b12da72282d36673
Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
-rw-r--r-- | org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/FileSnapshot.java | 9 | ||||
-rw-r--r-- | org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/RefDirectory.java | 4 |
2 files changed, 0 insertions, 13 deletions
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 d7f6ef316d..87d6a3ae71 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 @@ public class FileSnapshot { 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 2167262dd5..07e38147f7 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 @@ public class RefDirectory extends RefDatabase { 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) { |