From 5c2c652d7dd6346990143f10f9a7d520496cc871 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Thu, 28 Oct 2010 13:47:10 -0400 Subject: Fix support for file:// remotes. --- GitRepo.hs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'GitRepo.hs') diff --git a/GitRepo.hs b/GitRepo.hs index cd2c80691..fd69ec21a 100644 --- a/GitRepo.hs +++ b/GitRepo.hs @@ -79,7 +79,10 @@ repoFromPath dir = newFrom $ Dir dir {- Remote Repo constructor. Throws exception on invalid url. -} repoFromUrl :: String -> Repo -repoFromUrl url = newFrom $ Url $ fromJust $ parseURI url +repoFromUrl url + | startswith "file://" url = repoFromPath $ uriPath u + | otherwise = newFrom $ Url u + where u = fromJust $ parseURI url {- User-visible description of a git repo. -} repoDescribe Repo { remoteName = Just name } = name -- cgit v1.2.3