From 5ce97e8c736c121d53af23d7036264868a461db8 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Mon, 4 Sep 2017 12:40:33 -0400 Subject: implement exporttree=yes configuration * Only export to remotes that were initialized to support it. * Prevent storing key/value on export remotes. * Prevent enabling exporttree=yes and encryption in the same remote. SetupStage Enable was changed to take the old RemoteConfig. This allowed only setting exporttree when initially setting up a remote, and not configuring it later after stuff might already be stored in the remote. Went with =yes rather than =true for consistency with other parts of git-annex. Changed docs accordingly. This commit was supported by the NSF-funded DataLad project. --- Assistant/MakeRemote.hs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Assistant') diff --git a/Assistant/MakeRemote.hs b/Assistant/MakeRemote.hs index 57abb86fd..b98e7f023 100644 --- a/Assistant/MakeRemote.hs +++ b/Assistant/MakeRemote.hs @@ -52,7 +52,7 @@ makeRsyncRemote name location = makeRemote name location $ const $ void $ go Nothing = setupSpecialRemote name Rsync.remote config Nothing (Nothing, R.Init, Annex.SpecialRemote.newConfig name) go (Just (u, c)) = setupSpecialRemote name Rsync.remote config Nothing - (Just u, R.Enable, c) + (Just u, R.Enable c, c) config = M.fromList [ ("encryption", "shared") , ("rsyncurl", location) @@ -91,7 +91,7 @@ enableSpecialRemote name remotetype mcreds config = do r <- Annex.SpecialRemote.findExisting name case r of Nothing -> error $ "Cannot find a special remote named " ++ name - Just (u, c) -> setupSpecialRemote' False name remotetype config mcreds (Just u, R.Enable, c) + Just (u, c) -> setupSpecialRemote' False name remotetype config mcreds (Just u, R.Enable c, c) setupSpecialRemote :: RemoteName -> RemoteType -> R.RemoteConfig -> Maybe CredPair -> (Maybe UUID, R.SetupStage, R.RemoteConfig) -> Annex RemoteName setupSpecialRemote = setupSpecialRemote' True -- cgit v1.2.3