fix reversion

lost check of resp_actions in b82ecf7076
This commit is contained in:
Joey Hess 2019-08-04 12:43:16 -04:00
parent 7269851550
commit 9aab851a55
No known key found for this signature in database
GPG key ID: DB12DB0FF05F8F38

View file

@ -379,6 +379,8 @@ checkKey h key = getLFSEndpoint LFS.RequestDownload h >>= \case
case LFS.objects resp of
[] -> return False
(tro:_)
| isNothing (LFS.resp_actions tro) -> return False
| isJust (LFS.resp_error tro) -> return False
| LFS.resp_oid tro /= sha256 || LFS.resp_size tro /= size ->
giveup "git-lfs server replied with other object than the one we requested"
| otherwise -> return True