add sameas inherited configs to newConfig

This makes initremote --sameas work with encryption inherited.
This commit is contained in:
Joey Hess 2019-10-11 12:45:30 -04:00
parent 2bd6e81bb0
commit 91eed85fd4
No known key found for this signature in database
GPG key ID: DB12DB0FF05F8F38
5 changed files with 46 additions and 35 deletions

View file

@ -52,7 +52,7 @@ makeRsyncRemote name location = makeRemote name location $ const $ void $
go =<< Annex.SpecialRemote.findExisting name
where
go Nothing = setupSpecialRemote name Rsync.remote config Nothing
(Nothing, R.Init, Annex.SpecialRemote.newConfig name Nothing)
(Nothing, R.Init, Annex.SpecialRemote.newConfig name Nothing mempty mempty)
go (Just (u, c)) = setupSpecialRemote name Rsync.remote config Nothing
(Just u, R.Enable c, c)
config = M.fromList
@ -83,7 +83,7 @@ initSpecialRemote name remotetype mcreds config = go 0
let fullname = if n == 0 then name else name ++ show n
Annex.SpecialRemote.findExisting fullname >>= \case
Nothing -> setupSpecialRemote fullname remotetype config mcreds
(Nothing, R.Init, Annex.SpecialRemote.newConfig fullname Nothing)
(Nothing, R.Init, Annex.SpecialRemote.newConfig fullname Nothing mempty mempty)
Just _ -> go (n + 1)
{- Enables an existing special remote. -}