cache remote.log
Unlikely to speed up any of the existing uses much, but I want to use it in a message that might be displayed many times.
This commit is contained in:
parent
ebdce707da
commit
5cfcf1f05f
19 changed files with 62 additions and 29 deletions
|
@ -72,7 +72,7 @@ startNormalRemote name restparams r
|
|||
startSpecialRemote :: Git.RemoteName -> Remote.RemoteConfig -> Maybe (UUID, Remote.RemoteConfig, Maybe (SpecialRemote.ConfigFrom UUID)) -> CommandStart
|
||||
startSpecialRemote name config Nothing = do
|
||||
m <- SpecialRemote.specialRemoteMap
|
||||
confm <- Logs.Remote.readRemoteLog
|
||||
confm <- Logs.Remote.remoteConfigMap
|
||||
Remote.nameToUUID' name >>= \case
|
||||
Right u | u `M.member` m ->
|
||||
startSpecialRemote name config $
|
||||
|
|
|
@ -71,7 +71,7 @@ start o (name:ws) = ifM (isJust <$> findExisting name)
|
|||
(sameas o)
|
||||
c <- newConfig name sameasuuid
|
||||
(Logs.Remote.keyValToConfig Proposed ws)
|
||||
<$> readRemoteLog
|
||||
<$> remoteConfigMap
|
||||
t <- either giveup return (findType c)
|
||||
if whatElse o
|
||||
then startingCustomOutput (ActionItemOther Nothing) $
|
||||
|
|
|
@ -37,7 +37,7 @@ start ps@(oldname:newname:[]) = Annex.SpecialRemote.findExisting oldname >>= \ca
|
|||
Nothing -> Remote.nameToUUID' oldname >>= \case
|
||||
Left e -> giveup e
|
||||
Right u -> do
|
||||
m <- Logs.Remote.readRemoteLog
|
||||
m <- Logs.Remote.remoteConfigMap
|
||||
case M.lookup u m of
|
||||
Nothing -> giveup "That is not a special remote."
|
||||
Just cfg -> go u cfg Nothing
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue