Do verification of checksums of annex objects downloaded from remotes.
* When annex objects are received into git repositories, their checksums are verified then too. * To get the old, faster, behavior of not verifying checksums, set annex.verify=false, or remote.<name>.annex-verify=false. * setkey, rekey: These commands also now verify that the provided file matches the key, unless annex.verify=false. * reinject: Already verified content; this can now be disabled by setting annex.verify=false. recvkey and reinject already did verification, so removed now duplicate code from them. fsck still does its own verification, which is ok since it does not use getViaTmp, so verification doesn't happen twice when using fsck --from.
This commit is contained in:
parent
b72d3fbeba
commit
2fb3722ce9
18 changed files with 137 additions and 99 deletions
|
@ -52,7 +52,7 @@ perform file oldkey newkey = do
|
|||
{- Make a hard link to the old key content (when supported),
|
||||
- to avoid wasting disk space. -}
|
||||
linkKey :: Key -> Key -> Annex Bool
|
||||
linkKey oldkey newkey = getViaTmp' newkey $ \tmp -> do
|
||||
linkKey oldkey newkey = getViaTmp' DefaultVerify newkey $ \tmp -> do
|
||||
src <- calcRepo $ gitAnnexLocation oldkey
|
||||
liftIO $ ifM (doesFileExist tmp)
|
||||
( return True
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue