aboutsummaryrefslogtreecommitdiff
path: root/Git.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2011-12-09 18:57:09 -0400
committerGravatar Joey Hess <joey@kitenet.net>2011-12-09 18:57:09 -0400
commit4b3c4c0c2b88aa17a9b7822470e3e5dd2a3e7c2b (patch)
tree15aa009b770199bca447d81a9d2f0bb401908a91 /Git.hs
parent28699c95a7de284f07a5c0e34fb1755868301f3c (diff)
avoid some read
Diffstat (limited to 'Git.hs')
-rw-r--r--Git.hs2
1 files changed, 1 insertions, 1 deletions
diff --git a/Git.hs b/Git.hs
index 84153be5d..8bc32b7cc 100644
--- a/Git.hs
+++ b/Git.hs
@@ -345,7 +345,7 @@ urlPort :: Repo -> Maybe Integer
urlPort r =
case urlAuthPart uriPort r of
":" -> Nothing
- (':':p) -> Just (read p)
+ (':':p) -> readMaybe p
_ -> Nothing
{- Hostname of an URL repo, including any username (ie, "user@host") -}