use sameas-name and sameas-uuid for sameas remotes
initremote --sameas=remotename sets sameas-name and sameas-uuid Using sameas-name rather than name prevents old git-annex initremote from enabling a sameas remote by name, since it would not handle it correctly.
This commit is contained in:
parent
17afefd63f
commit
97b499a4dc
3 changed files with 32 additions and 10 deletions
|
@ -51,7 +51,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, R.Init, Annex.SpecialRemote.newConfig name Nothing)
|
||||
go (Just (u, c)) = setupSpecialRemote name Rsync.remote config Nothing
|
||||
(Just u, R.Enable c, c)
|
||||
config = M.fromList
|
||||
|
@ -82,7 +82,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, R.Init, Annex.SpecialRemote.newConfig fullname Nothing)
|
||||
Just _ -> go (n + 1)
|
||||
|
||||
{- Enables an existing special remote. -}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue