diff options
author | Joey Hess <joey@kitenet.net> | 2011-08-16 19:23:56 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2011-08-16 19:23:56 -0400 |
commit | cfcd7805b441c48e404826903480113a82cff9cf (patch) | |
tree | 8a26cd2090cbe05085c94712a50bd7ebc0351034 | |
parent | c04f1f4c30d5334b06b606c89fcb8e693bd88701 (diff) |
add repoIsHttp
-rw-r--r-- | Git.hs | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -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 |