aboutsummaryrefslogtreecommitdiff
path: root/Annex/Content.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joeyh@joeyh.name>2015-10-02 12:36:03 -0400
committerGravatar Joey Hess <joeyh@joeyh.name>2015-10-02 12:36:03 -0400
commitc3b38fb2a075b4250e867ebd910324c65712c747 (patch)
treec86571022d404dd430a8dc4fa6fac404ff68c828 /Annex/Content.hs
parent1fa36ce902db246943e5ecce9666920478e25b34 (diff)
avoid verification when hard linking to objects in shared repository
Such a repository is implicitly trusted, so there's no point.
Diffstat (limited to 'Annex/Content.hs')
-rw-r--r--Annex/Content.hs3
1 files changed, 2 insertions, 1 deletions
diff --git a/Annex/Content.hs b/Annex/Content.hs
index 679b7e6b7..34d4957bf 100644
--- a/Annex/Content.hs
+++ b/Annex/Content.hs
@@ -268,10 +268,11 @@ verifyKeyContent v k f = verifysize <&&> verifycontent
, return True
)
-data Verify = AlwaysVerify | RemoteVerify Remote | DefaultVerify
+data Verify = AlwaysVerify | NoVerify | RemoteVerify Remote | DefaultVerify
shouldVerify :: Verify -> Annex Bool
shouldVerify AlwaysVerify = return True
+shouldVerify NoVerify = return False
shouldVerify DefaultVerify = annexVerify <$> Annex.getGitConfig
shouldVerify (RemoteVerify r) = shouldVerify DefaultVerify
<&&> pure (remoteAnnexVerify (Types.Remote.gitconfig r))