add repoIsHttp
This commit is contained in:
parent
c04f1f4c30
commit
cfcd7805b4
1 changed files with 8 additions and 0 deletions
8
Git.hs
8
Git.hs
|
@ -17,6 +17,7 @@ module Git (
|
||||||
localToUrl,
|
localToUrl,
|
||||||
repoIsUrl,
|
repoIsUrl,
|
||||||
repoIsSsh,
|
repoIsSsh,
|
||||||
|
repoIsHttp,
|
||||||
repoIsLocalBare,
|
repoIsLocalBare,
|
||||||
repoDescribe,
|
repoDescribe,
|
||||||
repoLocation,
|
repoLocation,
|
||||||
|
@ -206,6 +207,13 @@ repoIsSsh Repo { location = Url url }
|
||||||
| otherwise = False
|
| otherwise = False
|
||||||
repoIsSsh _ = 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 -> Bool
|
||||||
configAvail Repo { config = c } = c /= M.empty
|
configAvail Repo { config = c } = c /= M.empty
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue