lfs endpoint discovery and caching in git-lfs special remote
This commit is contained in:
parent
03a765909c
commit
6c1130a3bb
3 changed files with 129 additions and 28 deletions
|
@ -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"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue