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
|
@ -109,7 +109,7 @@ gen baser u rc gc rs = do
|
|||
-- correctly.
|
||||
resetup gcryptid r = do
|
||||
let u' = genUUIDInNameSpace gCryptNameSpace gcryptid
|
||||
v <- M.lookup u' <$> readRemoteLog
|
||||
v <- M.lookup u' <$> remoteConfigMap
|
||||
case (Git.remoteName baser, v) of
|
||||
(Just remotename, Just rc') -> do
|
||||
pc <- parsedRemoteConfig remote rc'
|
||||
|
|
|
@ -187,9 +187,9 @@ mySetup ss mu _ c gc = do
|
|||
configKnownUrl :: Git.Repo -> Annex (Maybe Git.Repo)
|
||||
configKnownUrl r
|
||||
| Git.repoIsUrl r = do
|
||||
l <- readRemoteLog
|
||||
m <- remoteConfigMap
|
||||
g <- Annex.gitRepo
|
||||
case Annex.SpecialRemote.Config.findByRemoteConfig (match g) l of
|
||||
case Annex.SpecialRemote.Config.findByRemoteConfig (match g) m of
|
||||
((u, _, mcu):[]) -> Just <$> go u mcu
|
||||
_ -> return Nothing
|
||||
| otherwise = return Nothing
|
||||
|
|
|
@ -72,7 +72,7 @@ remoteList = do
|
|||
|
||||
remoteList' :: Bool -> Annex [Remote]
|
||||
remoteList' autoinit = do
|
||||
m <- readRemoteLog
|
||||
m <- remoteConfigMap
|
||||
rs <- concat <$> mapM (process m) remoteTypes
|
||||
Annex.changeState $ \s -> s { Annex.remotes = rs }
|
||||
return rs
|
||||
|
@ -96,7 +96,7 @@ remoteGen m t g = do
|
|||
{- Updates a local git Remote, re-reading its git config. -}
|
||||
updateRemote :: Remote -> Annex (Maybe Remote)
|
||||
updateRemote remote = do
|
||||
m <- readRemoteLog
|
||||
m <- remoteConfigMap
|
||||
remote' <- updaterepo =<< getRepo remote
|
||||
remoteGen m (remotetype remote) remote'
|
||||
where
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue