add repoIsHttp

This commit is contained in:
Joey Hess 2011-08-16 19:23:56 -04:00
parent c04f1f4c30
commit cfcd7805b4

8
Git.hs
View file

@ -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