diff options
author | Sean Whitton <spwhitton@spwhitton.name> | 2020-01-02 18:07:10 +0000 |
---|---|---|
committer | Sean Whitton <spwhitton@spwhitton.name> | 2020-01-02 18:07:10 +0000 |
commit | 1092316ba04116d7ae1d4cdf347804feacef768a (patch) | |
tree | fbc819794d4202a4ac778f0f6be57eedef7518dd /Git/Url.hs | |
parent | d1e0531dd8e8b842349421a898b74b212d2157e8 (diff) | |
parent | 50a5a7b101cc9c30a5a04b4c20cbf7f99fcab0ef (diff) | |
download | git-repair-1092316ba04116d7ae1d4cdf347804feacef768a.tar.gz |
Merge tag '1.20200102'
tagging package git-repair version 1.20200102
Diffstat (limited to 'Git/Url.hs')
-rw-r--r-- | Git/Url.hs | 10 |
1 files changed, 8 insertions, 2 deletions
@@ -2,7 +2,7 @@ - - Copyright 2010, 2011 Joey Hess <id@joeyh.name> - - - Licensed under the GNU GPL version 3 or higher. + - Licensed under the GNU AGPL version 3 or higher. -} module Git.Url ( @@ -11,9 +11,10 @@ module Git.Url ( port, hostuser, authority, + path, ) where -import Network.URI hiding (scheme, authority) +import Network.URI hiding (scheme, authority, path) import Common import Git.Types @@ -66,6 +67,11 @@ authpart :: (URIAuth -> a) -> Repo -> Maybe a authpart a Repo { location = Url u } = a <$> uriAuthority u authpart _ repo = notUrl repo +{- Path part of an URL repo. -} +path :: Repo -> FilePath +path Repo { location = Url u } = uriPath u +path repo = notUrl repo + notUrl :: Repo -> a notUrl repo = error $ "acting on local git repo " ++ repoDescribe repo ++ " not supported" |