summaryrefslogtreecommitdiff
path: root/Remote/Git.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2011-12-02 16:10:52 -0400
committerGravatar Joey Hess <joey@kitenet.net>2011-12-02 16:12:31 -0400
commite19dc8554723a148e6b809da4989a747f3aa925e (patch)
treee55363162c701f5250beae46323aa8e0a1a65ccb /Remote/Git.hs
parentfb68a7881f725a7b097f8b0f1b347f24dfea5d59 (diff)
factor out untilTrue
Diffstat (limited to 'Remote/Git.hs')
-rw-r--r--Remote/Git.hs5
1 files changed, 1 insertions, 4 deletions
diff --git a/Remote/Git.hs b/Remote/Git.hs
index 07afc0274..99ca9fe8e 100644
--- a/Remote/Git.hs
+++ b/Remote/Git.hs
@@ -200,10 +200,7 @@ copyFromRemote r key file
| Git.repoIsHttp r = liftIO $ downloadurls $ keyUrls r key
| otherwise = error "copying from non-ssh, non-http repo not supported"
where
- downloadurls [] = return False
- downloadurls (u:us) = do
- ok <- Url.download u file
- if ok then return ok else downloadurls us
+ downloadurls us = untilTrue us $ \u -> Url.download u file
{- Tries to copy a key's content to a remote's annex. -}
copyToRemote :: Git.Repo -> Key -> Annex Bool