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. --- Command/EnableRemote.hs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'Command') diff --git a/Command/EnableRemote.hs b/Command/EnableRemote.hs index a2a26009e..fd830375a 100644 --- a/Command/EnableRemote.hs +++ b/Command/EnableRemote.hs @@ -81,11 +81,11 @@ startSpecialRemote name config (Just (u, c)) = do gc <- maybe (liftIO dummyRemoteGitConfig) (return . Remote.gitconfig) =<< Remote.byUUID u - next $ performSpecialRemote t u fullconfig gc + next $ performSpecialRemote t u c fullconfig gc -performSpecialRemote :: RemoteType -> UUID -> R.RemoteConfig -> RemoteGitConfig -> CommandPerform -performSpecialRemote t u c gc = do - (c', u') <- R.setup t R.Enable (Just u) Nothing c gc +performSpecialRemote :: RemoteType -> UUID -> R.RemoteConfig -> R.RemoteConfig -> RemoteGitConfig -> CommandPerform +performSpecialRemote t u oldc c gc = do + (c', u') <- R.setup t (R.Enable oldc) (Just u) Nothing c gc next $ cleanupSpecialRemote u' c' cleanupSpecialRemote :: UUID -> R.RemoteConfig -> CommandCleanup -- cgit v1.2.3