aboutsummaryrefslogtreecommitdiff
path: root/Types
diff options
context:
space:
mode:
authorGravatar Joey Hess <joeyh@joeyh.name>2018-01-10 14:21:18 -0400
committerGravatar Joey Hess <joeyh@joeyh.name>2018-01-10 14:21:18 -0400
commitab17c8a5ccc5fa41e9fa489edfb1f828b4e3f2c5 (patch)
treeb0129471c93a6c8e8d36e7c4a09391a82821ab22 /Types
parent24adb479480327b960d1db2806896f6ed8da8cce (diff)
add remote.<name>.annex-checkuuid
Added remote.<name>.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.
Diffstat (limited to 'Types')
-rw-r--r--Types/GitConfig.hs2
1 files changed, 2 insertions, 0 deletions
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")