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
|
@ -53,7 +53,11 @@ start o (name:ws) = ifM (isJust <$> findExisting name)
|
|||
ifM (isJust <$> Remote.byNameOnly name)
|
||||
( giveup $ "There is already a remote named \"" ++ name ++ "\""
|
||||
, do
|
||||
let c = newConfig name
|
||||
sameasuuid <- maybe
|
||||
(pure Nothing)
|
||||
(Just . Sameas <$$> getParsed)
|
||||
(sameas o)
|
||||
let c = newConfig name sameasuuid
|
||||
t <- either giveup return (findType config)
|
||||
starting "initremote" (ActionItemOther (Just name)) $
|
||||
perform t name $ M.union config c
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue