summaryrefslogtreecommitdiffstats
path: root/vendor/gix/src/remote/errors.rs
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/gix/src/remote/errors.rs')
-rw-r--r--vendor/gix/src/remote/errors.rs23
1 files changed, 21 insertions, 2 deletions
diff --git a/vendor/gix/src/remote/errors.rs b/vendor/gix/src/remote/errors.rs
index 20060cedf..34ed8246b 100644
--- a/vendor/gix/src/remote/errors.rs
+++ b/vendor/gix/src/remote/errors.rs
@@ -2,7 +2,7 @@
pub mod find {
use crate::{bstr::BString, config, remote};
- /// The error returned by [`Repository::find_remote(…)`][crate::Repository::find_remote()].
+ /// The error returned by [`Repository::find_remote(…)`](crate::Repository::find_remote()).
#[derive(Debug, thiserror::Error)]
#[allow(missing_docs)]
pub enum Error {
@@ -30,7 +30,7 @@ pub mod find {
pub mod existing {
use crate::bstr::BString;
- /// The error returned by [`Repository::find_remote(…)`][crate::Repository::find_remote()].
+ /// The error returned by [`Repository::find_remote(…)`](crate::Repository::find_remote()).
#[derive(Debug, thiserror::Error)]
#[allow(missing_docs)]
pub enum Error {
@@ -42,4 +42,23 @@ pub mod find {
NotFound { name: BString },
}
}
+
+ ///
+ pub mod for_fetch {
+ /// The error returned by [`Repository::find_fetch_remote(…)`](crate::Repository::find_fetch_remote()).
+ #[derive(Debug, thiserror::Error)]
+ #[allow(missing_docs)]
+ pub enum Error {
+ #[error(transparent)]
+ FindExisting(#[from] super::existing::Error),
+ #[error(transparent)]
+ FindExistingReferences(#[from] crate::reference::find::existing::Error),
+ #[error("Could not initialize a URL remote")]
+ Init(#[from] crate::remote::init::Error),
+ #[error("remote name could not be parsed as URL")]
+ UrlParse(#[from] gix_url::parse::Error),
+ #[error("No configured remote could be found, or too many were available")]
+ ExactlyOneRemoteNotAvailable,
+ }
+ }
}