diff options
author | Joey Hess <joeyh@joeyh.name> | 2015-10-02 12:36:03 -0400 |
---|---|---|
committer | Joey Hess <joeyh@joeyh.name> | 2015-10-02 12:36:03 -0400 |
commit | c3b38fb2a075b4250e867ebd910324c65712c747 (patch) | |
tree | c86571022d404dd430a8dc4fa6fac404ff68c828 /Annex/Content.hs | |
parent | 1fa36ce902db246943e5ecce9666920478e25b34 (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.hs | 3 |
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)) |