This commit is contained in:
Joey Hess 2011-11-09 01:15:51 -04:00
parent bf460a0a98
commit 56b8194470
7 changed files with 13 additions and 22 deletions

View file

@ -19,10 +19,10 @@ import qualified Git
-}
findSpecialRemotes :: String -> Annex [Git.Repo]
findSpecialRemotes s = do
g <- gitRepo
return $ map construct $ remotepairs g
m <- fromRepo $ Git.configMap
return $ map construct $ remotepairs m
where
remotepairs r = M.toList $ M.filterWithKey match $ Git.configMap r
remotepairs = M.toList . M.filterWithKey match
construct (k,_) = Git.repoRemoteNameFromKey k Git.repoFromUnknown
match k _ = startswith "remote." k && endswith (".annex-"++s) k