summaryrefslogtreecommitdiff
path: root/Command/Sync.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2011-12-31 03:27:37 -0400
committerGravatar Joey Hess <joey@kitenet.net>2011-12-31 03:27:37 -0400
commit8a33573caff38b557fdf60c9547a78a5cc8c4ddc (patch)
treefed26c043272c62738a9e83357283535195c0397 /Command/Sync.hs
parent6cd4c7efcdea9a8897aa6b9e2b30e7e3426574bc (diff)
better filtering out of special remotes
Diffstat (limited to 'Command/Sync.hs')
-rw-r--r--Command/Sync.hs7
1 files changed, 3 insertions, 4 deletions
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