feat: Impl support for alternative registries (#1184)

Fixed #1168

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
This commit is contained in:
Jiahao XU 2023-06-30 13:52:40 +10:00 committed by GitHub
parent d4ffc68129
commit 01a87ac606
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
18 changed files with 779 additions and 132 deletions

View file

@ -8,6 +8,8 @@ use tracing::debug;
mod progress_tracing;
use progress_tracing::TracingProgress;
pub use gix::url::parse::Error as GitUrlParseError;
#[derive(Debug, ThisError)]
#[non_exhaustive]
pub enum GitError {
@ -43,7 +45,7 @@ impl From<clone::checkout::main_worktree::Error> for GitError {
pub struct GitUrl(Url);
impl FromStr for GitUrl {
type Err = gix::url::parse::Error;
type Err = GitUrlParseError;
fn from_str(s: &str) -> Result<Self, Self::Err> {
Url::try_from(s).map(Self)