From 8a33573caff38b557fdf60c9547a78a5cc8c4ddc Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Sat, 31 Dec 2011 03:27:37 -0400 Subject: better filtering out of special remotes --- Command/Sync.hs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'Command/Sync.hs') diff --git a/Command/Sync.hs b/Command/Sync.hs index f3a83517c..6e78543ef 100644 --- a/Command/Sync.hs +++ b/Command/Sync.hs @@ -17,10 +17,10 @@ import qualified Annex import qualified Annex.Branch import qualified Git.Command import qualified Git.Branch -import qualified Git.Config import qualified Git.Ref import qualified Git import qualified Types.Remote +import qualified Remote.Git import qualified Data.ByteString.Lazy.Char8 as L import qualified Data.Map as M @@ -61,9 +61,8 @@ syncRemotes rs = do | null rs = available | otherwise = listed listed = mapM Remote.byName rs - available = filterM hasurl =<< Remote.enabledRemoteList - hasurl r = not . null <$> geturl r - geturl r = fromRepo $ Git.Config.get ("remote." ++ Remote.name r ++ ".url") "" + available = filter nonspecial <$> Remote.enabledRemoteList + nonspecial r = Types.Remote.remotetype r == Remote.Git.remote fastest = fromMaybe [] . headMaybe . map snd . sort . M.toList . costmap costmap = M.fromListWith (++) . map costpair -- cgit v1.2.3