aboutsummaryrefslogtreecommitdiff
path: root/Remotes.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2011-03-27 15:56:43 -0400
committerGravatar Joey Hess <joey@kitenet.net>2011-03-27 16:04:25 -0400
commitb40f253d6e126d699e9f298bf670fc5e875bfd86 (patch)
tree546a11e81490fcc6b098085ceebd315cf3f6a305 /Remotes.hs
parent2821effce9ae95a2ef12a083ce0806fe058ac987 (diff)
start of generalizing remotes
Goal is to support multiple different types of remotes, some of which are not git repositories. To that end, added a Remote class, and moved git remote specific code into Remote.GitRemote. Remotes.hs is still present as some code has not been converted to use the new Remote class yet.
Diffstat (limited to 'Remotes.hs')
-rw-r--r--Remotes.hs9
1 files changed, 9 insertions, 0 deletions
diff --git a/Remotes.hs b/Remotes.hs
index 5a65e4fc7..5fc594ee2 100644
--- a/Remotes.hs
+++ b/Remotes.hs
@@ -322,3 +322,12 @@ git_annex_shell r command params
shellopts = (Param command):(File dir):params
sshcmd = shellcmd ++ " " ++
unwords (map shellEscape $ toCommand shellopts)
+
+{- Filters a list of repos to ones that have listed UUIDs. -}
+reposByUUID :: [Git.Repo] -> [UUID] -> Annex [Git.Repo]
+reposByUUID repos uuids = filterM match repos
+ where
+ match r = do
+ u <- getUUID r
+ return $ u `elem` uuids
+