diff options
author | Joey Hess <joey@kitenet.net> | 2010-10-22 20:47:14 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2010-10-22 20:47:14 -0400 |
commit | f4e2dde8a8ceaf689ec5391174b53cb1b213ea8b (patch) | |
tree | a2865cce91287fa8fcb1aedba1c3759245bb9823 /Remotes.hs | |
parent | ff38e49eb453ccfd58ce0e424aeca97389ab0100 (diff) |
fix perl refugee code
Diffstat (limited to 'Remotes.hs')
-rw-r--r-- | Remotes.hs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Remotes.hs b/Remotes.hs index 8418a4225..48ab9ef8c 100644 --- a/Remotes.hs +++ b/Remotes.hs @@ -49,11 +49,11 @@ withKey key = do let cheap = filter (not . Git.repoIsUrl) allremotes let expensive = filter Git.repoIsUrl allremotes doexpensive <- filterM cachedUUID expensive - if (0 < length doexpensive) + if (not $ null doexpensive) then showNote $ "getting UUIDs for " ++ (list doexpensive) ++ "..." else return () let todo = cheap ++ doexpensive - if (0 < length todo) + if (not $ null todo) then do e <- mapM tryGitConfigRead todo Annex.flagChange "remotesread" $ FlagBool True @@ -62,7 +62,7 @@ withKey key = do where cachedUUID r = do u <- getUUID r - return $ 0 == length u + return $ null u {- Cost Ordered list of remotes. -} remotesByCost :: Annex [Git.Repo] @@ -90,7 +90,7 @@ reposByCost l = do repoCost :: Git.Repo -> Annex Int repoCost r = do g <- Annex.gitRepo - if ((length $ config g r) > 0) + if (not $ null $ config g r) then return $ read $ config g r else if (Git.repoIsUrl r) then return 200 |