From cfcd7805b441c48e404826903480113a82cff9cf Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Tue, 16 Aug 2011 19:23:56 -0400 Subject: add repoIsHttp --- Git.hs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Git.hs b/Git.hs index 9b7ac7ea9..b226bce0f 100644 --- a/Git.hs +++ b/Git.hs @@ -17,6 +17,7 @@ module Git ( localToUrl, repoIsUrl, repoIsSsh, + repoIsHttp, repoIsLocalBare, repoDescribe, repoLocation, @@ -206,6 +207,13 @@ repoIsSsh Repo { location = Url url } | otherwise = False repoIsSsh _ = False +repoIsHttp :: Repo -> Bool +repoIsHttp Repo { location = Url url } + | uriScheme url == "http:" = True + | uriScheme url == "https:" = True + | otherwise = False +repoIsHttp _ = False + configAvail ::Repo -> Bool configAvail Repo { config = c } = c /= M.empty -- cgit v1.2.3