From ab17c8a5ccc5fa41e9fa489edfb1f828b4e3f2c5 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Wed, 10 Jan 2018 14:21:18 -0400 Subject: add remote..annex-checkuuid Added remote..annex-checkuuid config, which can be set to false to disable the default checking of the uuid of remotes that point to directories. This can be useful to avoid unncessary drive spin-ups and automounting. Note that the UUID check is still done before writing to the repository, to avoid writing to the wrong repository if it got relocated. Check is also done before checkPresent to avoid getting confused about what is in which repo. This is effectively the same as the use of git-annex-shell with a uuid to check that the remote repository is the expected one. Did not bother with the check for retrieveKeyFile because it doesn't matter if the wrong repo is used then. This commit was sponsored by Trenton Cronholm on Patreon. --- Types/GitConfig.hs | 2 ++ 1 file changed, 2 insertions(+) (limited to 'Types') diff --git a/Types/GitConfig.hs b/Types/GitConfig.hs index 9a48ad173..ad22dadb8 100644 --- a/Types/GitConfig.hs +++ b/Types/GitConfig.hs @@ -199,6 +199,7 @@ data RemoteGitConfig = RemoteGitConfig , remoteAnnexPush :: Bool , remoteAnnexReadOnly :: Bool , remoteAnnexVerify :: Bool + , remoteAnnexCheckUUID :: Bool , remoteAnnexExportTracking :: Maybe Git.Ref , remoteAnnexTrustLevel :: Maybe String , remoteAnnexStartCommand :: Maybe String @@ -247,6 +248,7 @@ extractRemoteGitConfig r remotename = do , remoteAnnexPull = getbool "pull" True , remoteAnnexPush = getbool "push" True , remoteAnnexReadOnly = getbool "readonly" False + , remoteAnnexCheckUUID = getbool "checkuuid" True , remoteAnnexVerify = getbool "verify" True , remoteAnnexExportTracking = Git.Ref <$> notempty (getmaybe "export-tracking") -- cgit v1.2.3