lfs endpoint discovery and caching in git-lfs special remote

This commit is contained in:
Joey Hess 2019-08-02 12:38:14 -04:00
parent 03a765909c
commit 6c1130a3bb
No known key found for this signature in database
GPG key ID: DB12DB0FF05F8F38
3 changed files with 129 additions and 28 deletions

View file

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