diff options
author | Joey Hess <joey@kitenet.net> | 2012-08-26 14:34:30 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2012-08-26 14:34:30 -0400 |
commit | f4ca592cd0ac4940645f2f17fadac5e0da45424d (patch) | |
tree | da00855b29ceeddbb776c7fb28f2b0894d0fee2e /Command/Sync.hs | |
parent | 78d3add86b564149cd1e7c4527deffbf30cf839b (diff) |
refactor
Diffstat (limited to 'Command/Sync.hs')
-rw-r--r-- | Command/Sync.hs | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/Command/Sync.hs b/Command/Sync.hs index 023b1b84a..986dd417b 100644 --- a/Command/Sync.hs +++ b/Command/Sync.hs @@ -66,15 +66,14 @@ syncRemotes rs = ifM (Annex.getState Annex.fast) ( nub <$> pickfast , wanted ) | otherwise = listed listed = do l <- catMaybes <$> mapM (Remote.byName . Just) rs - let s = filter special l + let s = filter Remote.specialRemote l unless (null s) $ error $ "cannot sync special remotes: " ++ unwords (map Types.Remote.name s) return l - available = filter nonspecial <$> Remote.enabledRemoteList + available = filter (not . Remote.specialRemote) + <$> Remote.enabledRemoteList good = filterM $ Remote.Git.repoAvail . Types.Remote.repo - nonspecial r = Types.Remote.remotetype r == Remote.Git.remote - special = not . nonspecial fastest = fromMaybe [] . headMaybe . byspeed byspeed = map snd . sort . M.toList . costmap costmap = M.fromListWith (++) . map costpair |