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>
This commit is contained in:
Thomas Wolf 2021-12-26 15:51:23 +01:00
commit 7edb062d8c
2 changed files with 0 additions and 13 deletions

View File

@ -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() {

View File

@ -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) {