remoteConfig rework
remoteAnnexConfig will avoid bugs like
a3a674d15b
Use now more generic remoteConfig in a couple places that built
non-annex config settings manually before.
This commit is contained in:
parent
a3a674d15b
commit
69f2d1dd43
17 changed files with 30 additions and 26 deletions
|
@ -94,7 +94,7 @@ cleanupSpecialRemote u c mcu = do
|
|||
Nothing ->
|
||||
Logs.Remote.configSet u c
|
||||
Just (SpecialRemote.ConfigFrom cu) -> do
|
||||
setConfig (remoteConfig c "config-uuid") (fromUUID cu)
|
||||
setConfig (remoteAnnexConfig c "config-uuid") (fromUUID cu)
|
||||
Logs.Remote.configSet cu c
|
||||
Remote.byUUID u >>= \case
|
||||
Nothing -> noop
|
||||
|
|
|
@ -81,7 +81,7 @@ seek o = do
|
|||
|
||||
-- handle deprecated option
|
||||
when (exportTracking o) $
|
||||
setConfig (remoteConfig r "tracking-branch")
|
||||
setConfig (remoteAnnexConfig r "tracking-branch")
|
||||
(fromRef $ exportTreeish o)
|
||||
|
||||
tree <- filterPreferredContent r =<<
|
||||
|
|
|
@ -107,7 +107,7 @@ cleanup u name c o = do
|
|||
Logs.Remote.configSet u c
|
||||
Just _ -> do
|
||||
cu <- liftIO genUUID
|
||||
setConfig (remoteConfig c "config-uuid") (fromUUID cu)
|
||||
setConfig (remoteAnnexConfig c "config-uuid") (fromUUID cu)
|
||||
Logs.Remote.configSet cu c
|
||||
return True
|
||||
|
||||
|
|
|
@ -320,7 +320,7 @@ setupLink remotename (P2PAddressAuth addr authtoken) = do
|
|||
, Param (formatP2PAddress addr)
|
||||
]
|
||||
when ok $ do
|
||||
storeUUIDIn (remoteConfig remotename "uuid") theiruuid
|
||||
storeUUIDIn (remoteAnnexConfig remotename "uuid") theiruuid
|
||||
storeP2PRemoteAuthToken addr authtoken
|
||||
return LinkSuccess
|
||||
go (Right Nothing) = return $ AuthenticationError "Unable to authenticate with peer. Please check the address and try again."
|
||||
|
|
|
@ -788,7 +788,7 @@ seekExportContent o rs (currbranch, _) = or <$> forM rs go
|
|||
]
|
||||
_ -> noop
|
||||
where
|
||||
gitconfig = show (remoteConfig r "tracking-branch")
|
||||
gitconfig = show (remoteAnnexConfig r "tracking-branch")
|
||||
|
||||
fillexport _ _ [] _ = return False
|
||||
fillexport r db (tree:[]) mtbcommitsha = do
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue