map: Work when there are gcrypt remotes.
This commit is contained in:
parent
832598d1d9
commit
58db042033
5 changed files with 25 additions and 21 deletions
|
@ -104,14 +104,16 @@ localToUrl :: Repo -> Repo -> Repo
|
|||
localToUrl reference r
|
||||
| not $ repoIsUrl reference = error "internal error; reference repo not url"
|
||||
| repoIsUrl r = r
|
||||
| otherwise = r { location = Url $ fromJust $ parseURI absurl }
|
||||
where
|
||||
absurl = concat
|
||||
[ Url.scheme reference
|
||||
, "//"
|
||||
, Url.authority reference
|
||||
, repoPath r
|
||||
]
|
||||
| otherwise = case Url.authority reference of
|
||||
Nothing -> r
|
||||
Just auth ->
|
||||
let absurl = concat
|
||||
[ Url.scheme reference
|
||||
, "//"
|
||||
, auth
|
||||
, repoPath r
|
||||
]
|
||||
in r { location = Url $ fromJust $ parseURI absurl }
|
||||
|
||||
{- Calculates a list of a repo's configured remotes, by parsing its config. -}
|
||||
fromRemotes :: Repo -> IO [Repo]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue