Merge branch 'stable-5.8' into stable-5.9
* stable-5.8: Revert "RefDirectory.scanRef: Re-use file existence check done in snapshot creation" Change-Id: I88a629e571fec5a9820114ebf5765b5d94a276bd Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
This commit is contained in:
commit
95ea1c1123
|
@ -407,15 +407,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() {
|
||||
|
|
|
@ -1092,10 +1092,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) {
|
||||
|
|
Loading…
Reference in New Issue