1use super::{
2 super::{context::*, errors::*, url::*},
3 errors::*,
4 git_url::*,
5};
6
7use relative_path::*;
8
9impl UrlContext {
10 pub fn git_url(
12 self: &UrlContextRef,
13 conformed_repository_url: UrlRef,
14 path: RelativePathBuf,
15 ) -> Result<UrlRef, UrlError> {
16 let repository_gix_url =
18 gix::Url::from_bytes(conformed_repository_url.to_string().as_bytes().into()).map_err(GitError::from)?;
19
20 Ok(GitUrl::new(self, conformed_repository_url.into(), repository_gix_url, path).into())
21 }
22}