force verification when resuming download
When resuming a download and not using a rolling checksummer like rsync, the partial file we start with might contain garbage, in the case where a file changed as it was being downloaded. So, disabling verification on resumes risked a bad object being put into the annex. Even downloads with rsync are currently affected. It didn't seem worth the added complexity to special case those to prevent verification, especially since git-annex is using rsync less often now. This commit was sponsored by Brock Spratlen on Patreon.
This commit is contained in:
parent
31e1adc005
commit
4015c5679a
5 changed files with 41 additions and 19 deletions
|
@ -151,12 +151,13 @@ instance ToUUID (RemoteA a) where
|
|||
|
||||
data Verification
|
||||
= UnVerified
|
||||
-- ^ content was not verified during transfer, but is probably
|
||||
-- ^ Content was not verified during transfer, but is probably
|
||||
-- ok, so if verification is disabled, don't verify it
|
||||
| Verified
|
||||
-- ^ content of key was verified during transfer
|
||||
-- ^ Content was verified during transfer, so don't verify it
|
||||
-- again.
|
||||
| MustVerify
|
||||
-- ^ content likely to have been altered during transfer,
|
||||
-- ^ Content likely to have been altered during transfer,
|
||||
-- verify even if verification is normally disabled
|
||||
|
||||
unVerified :: Monad m => m Bool -> m (Bool, Verification)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue