summaryrefslogtreecommitdiff
path: root/Remote/Git.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2011-03-29 17:20:22 -0400
committerGravatar Joey Hess <joey@kitenet.net>2011-03-29 17:20:22 -0400
commit72f94cc42eca1a6aaa7cc95daf423915761805ff (patch)
treed2e4363596bfa582a1a1d5ebee71f71edffce93a /Remote/Git.hs
parent475f7073613b7164302e3f826f60929cf4cd38f0 (diff)
progress
Diffstat (limited to 'Remote/Git.hs')
-rw-r--r--Remote/Git.hs11
1 files changed, 6 insertions, 5 deletions
diff --git a/Remote/Git.hs b/Remote/Git.hs
index 85bd04a23..e5f2aa62d 100644
--- a/Remote/Git.hs
+++ b/Remote/Git.hs
@@ -14,7 +14,7 @@ import Control.Exception.Extensible
import Control.Monad.State (liftIO)
import qualified Data.Map as M
import System.Cmd.Utils
-import Control.Monad (filterM, liftM)
+import Control.Monad (filterM, liftM, when)
import Data.String.Utils
import Maybe
@@ -50,18 +50,19 @@ gen = do
- cached UUID value. -}
let cheap = filter (not . Git.repoIsUrl) allremotes
let expensive = filter Git.repoIsUrl allremotes
- expensive_todo <- filterM cachedUUID expensive
+ expensive_todo <- filterM noCachedUUID expensive
let skip = filter (`notElem` expensive_todo) expensive
let todo = cheap++expensive_todo
- showNote $ "getting UUID for " ++ (join ", " $
- map Git.repoDescribe expensive_todo)
+ when (not $ null expensive_todo) $
+ showNote $ "getting UUID for " ++ (join ", " $
+ map Git.repoDescribe expensive_todo)
done <- mapM tryGitConfigRead todo
generated <- mapM genRemote $ skip ++ done
return $ catMaybes generated
where
- cachedUUID r = liftM null $ getUUID r
+ noCachedUUID r = liftM null $ getUUID r
genRemote :: Git.Repo -> Annex (Maybe (Remote Annex))
genRemote r = do