summaryrefslogtreecommitdiff
path: root/Command/InitRemote.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2011-10-31 16:46:51 -0400
committerGravatar Joey Hess <joey@kitenet.net>2011-10-31 17:22:55 -0400
commit3d2a9f84051e9dc705ba4bb4828af691e479ae0e (patch)
treef99ff17d8fa860d1dcf2c8ebd8552e1e80bda8b3 /Command/InitRemote.hs
parent00988bcf369671bdc3b78e95e3c2ae43f4835b1c (diff)
cleanup
Diffstat (limited to 'Command/InitRemote.hs')
-rw-r--r--Command/InitRemote.hs4
1 files changed, 3 insertions, 1 deletions
diff --git a/Command/InitRemote.hs b/Command/InitRemote.hs
index 4ba5b0787..600e17eb8 100644
--- a/Command/InitRemote.hs
+++ b/Command/InitRemote.hs
@@ -67,7 +67,9 @@ findByName name = do
return (uuid, M.insert nameKey name M.empty)
findByName' :: String -> M.Map UUID R.RemoteConfig -> Maybe (UUID, R.RemoteConfig)
-findByName' n m = if null matches then Nothing else Just $ head matches
+findByName' n m
+ | null matches = Nothing
+ | otherwise = Just $ head matches
where
matches = filter (matching . snd) $ M.toList m
matching c = case M.lookup nameKey c of