pub enum GitError {
Show 27 variants
EmptySpec,
NoCommits,
RemoteNotFound(String),
RemoteHasNoUrl(String),
NonUtf8RemoteUrl {
remote: String,
source: FromUtf8Error,
},
Bundle(Box<BundleError>),
Panic(JoinError),
Io(Error),
RevParse(Error),
FindObject(Error),
PeelToKind(Error),
HeadCommit(Error),
DecodeCommit(Error),
ShortId(Error),
MergeBase(Box<Error>),
WorktreeStream(Box<Error>),
WorktreeArchive(Box<Error>),
FindRemote(Box<Error>),
Open(Box<Error>),
Discover(Box<Error>),
ConfigKeyParse(String),
ConfigInvalidSectionName {
name: String,
source: Error,
},
ConfigInvalidValueName {
name: String,
source: Error,
},
ConfigKeyNotSet(String),
ConfigParse(Box<Error>),
ConfigLock(Box<Error>),
TagChainCycle {
oid: ObjectId,
},
}Expand description
Aggregate error for the helpers in this module.
Variants§
EmptySpec
Caller passed an empty rev-spec.
NoCommits
head_commit() was called on a repository with no commits.
RemoteNotFound(String)
Named remote does not exist.
RemoteHasNoUrl(String)
Remote exists but has neither a fetch nor a push URL.
NonUtf8RemoteUrl
Remote URL is not valid UTF-8.
Fields
source: FromUtf8ErrorThe underlying decode error.
Bundle(Box<BundleError>)
Native bundle operation failed.
Panic(JoinError)
A spawn_blocking task panicked.
Io(Error)
Local I/O error.
RevParse(Error)
rev_parse_single failed.
FindObject(Error)
Could not find an object referenced from a rev-spec.
PeelToKind(Error)
Could not peel an object to the requested kind.
HeadCommit(Error)
head_commit() failed.
DecodeCommit(Error)
Could not decode commit object.
ShortId(Error)
Computing a short id failed.
MergeBase(Box<Error>)
Underlying merge-base computation failed.
WorktreeStream(Box<Error>)
Building the worktree stream for archive emission failed.
WorktreeArchive(Box<Error>)
Writing the archive to disk failed.
FindRemote(Box<Error>)
find_remote() failed.
Open(Box<Error>)
gix::open() failed.
Discover(Box<Error>)
gix::discover() failed when locating the config file.
ConfigKeyParse(String)
Dotted config key was empty, contained empty segments, or had no ..
ConfigInvalidSectionName
gix-config rejected a section header (invalid name characters).
ConfigInvalidValueName
gix-config rejected a value name (invalid characters or non-alphabetic start).
ConfigKeyNotSet(String)
--unset was issued for a key that is not present in the local config.
ConfigParse(Box<Error>)
Failed to parse the existing .git/config file.
ConfigLock(Box<Error>)
Failed to acquire a lock file for an atomic file write (e.g.
.git/config.lock, .git/shallow.lock).
TagChainCycle
A tag chain visited the same OID twice — i.e. a cycle. Real git objects cannot form cycles (each tag’s OID is determined by the SHA-1 of its content, which includes the target OID, so a cycle would require a SHA-1 preimage). This guard exists for adversarial or corrupted ODB inputs that bypass the hashing invariant.
Trait Implementations§
Source§impl Error for GitError
impl Error for GitError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()
Source§impl From<GitError> for FetchError
impl From<GitError> for FetchError
Source§impl From<GitError> for InstallError
impl From<GitError> for InstallError
Source§impl From<GitError> for PackchainError
impl From<GitError> for PackchainError
Auto Trait Implementations§
impl !RefUnwindSafe for GitError
impl !UnwindSafe for GitError
impl Freeze for GitError
impl Send for GitError
impl Sync for GitError
impl Unpin for GitError
impl UnsafeUnpin for GitError
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> ErrorExt for T
impl<T> ErrorExt for T
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<T> ToStringFallible for Twhere
T: Display,
impl<T> ToStringFallible for Twhere
T: Display,
Source§fn try_to_string(&self) -> Result<String, TryReserveError>
fn try_to_string(&self) -> Result<String, TryReserveError>
ToString::to_string, but without panic on OOM.