summaryrefslogtreecommitdiff
path: root/Remote.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joeyh@joeyh.name>2015-04-14 15:35:15 -0400
committerGravatar Joey Hess <joeyh@joeyh.name>2015-04-14 15:35:15 -0400
commit513b3a639796b06828570b6da6b049095abd5b83 (patch)
treeadc204e55854d1d5d4f75689ea17fa9624142872 /Remote.hs
parentcd4304b64943ba55ffc8beac47796affc5405fd8 (diff)
parent1029cba6ac006b34053f3f96cbee9ecafe8cc1ae (diff)
Merge branch 'master' into concurrentprogress
Conflicts: debian/changelog
Diffstat (limited to 'Remote.hs')
-rw-r--r--Remote.hs7
1 files changed, 3 insertions, 4 deletions
diff --git a/Remote.hs b/Remote.hs
index 58c1a0f17..8a03f757d 100644
--- a/Remote.hs
+++ b/Remote.hs
@@ -83,7 +83,7 @@ remoteMap' mkv mkk = M.fromList . mapMaybe mk <$> remoteList
Nothing -> Nothing
Just k -> Just (k, mkv r)
-{- Map of UUIDs of remotes and their descriptions.
+{- Map of UUIDs of repositories and their descriptions.
- The names of Remotes are added to suppliment any description that has
- been set for a repository. -}
uuidDescriptions :: Annex (M.Map UUID String)
@@ -130,8 +130,7 @@ byName' n = go . filter matching <$> remoteList
byNameOrGroup :: RemoteName -> Annex [Remote]
byNameOrGroup n = go =<< getConfigMaybe (ConfigKey ("remotes." ++ n))
where
- go (Just l) = concatMap maybeToList <$>
- mapM (byName . Just) (split " " l)
+ go (Just l) = catMaybes <$> mapM (byName . Just) (split " " l)
go Nothing = maybeToList <$> byName (Just n)
{- Only matches remote name, not UUID -}
@@ -343,4 +342,4 @@ claimingUrl url = do
let web = Prelude.head $ filter (\r -> uuid r == webUUID) rs
fromMaybe web <$> firstM checkclaim rs
where
- checkclaim = maybe (pure False) (flip id url) . claimUrl
+ checkclaim = maybe (pure False) (`id` url) . claimUrl