Merge branch 'stable-5.2' into stable-5.3

* stable-5.2:
  Revert "RefDirectory.scanRef: Re-use file existence check done in snapshot creation"

Change-Id: Id37f47a5ef2e3c8329eca30c171941f7e5606a85
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 @@
 		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 8f64622..9542025 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 @@
 		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) {