pub enum GitError {
Denied(&'static str),
Engine(Error),
Io(Error),
Unsupported(&'static str),
Refused(String),
Conflict(String),
BadPlan(String),
}Expand description
Errors from the embedded git engine.
Variants§
Denied(&'static str)
The GitCaveats surface denied this operation class (fail-closed).
Engine(Error)
The underlying grit-lib engine failed.
Io(Error)
A filesystem read of a worktree file failed (during staging).
Unsupported(&'static str)
The operation isn’t supported in this repository state (e.g. bare repo, detached/unborn HEAD).
Refused(String)
The operation was refused for a runtime reason that carries a dynamic message — e.g. deleting the current branch, or switching to a branch at a different commit (no working-tree updater here). No side effects.
Conflict(String)
A rebase step produced a merge conflict; the rebase was aborted and the branch ref was left untouched (no side effects).
BadPlan(String)
The rebase plan was malformed (e.g. a squash before any pick).
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)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
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
Mutably borrows from an owned value. Read more
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
impl<T> ErasedDestructor for Twhere
T: 'static,
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>
Converts
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>
Converts
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 more