pub enum GitDiffError {
NotRepository,
UnsupportedRepositoryPath,
InvalidPath(RepoPathError),
PathEscapesRepository {
path: String,
},
NotAFile {
path: String,
},
EmptyCommitMessage,
Spawn {
operation: &'static str,
source: Error,
},
CommandFailed {
operation: &'static str,
status: Option<i32>,
stderr: String,
},
Io {
path: PathBuf,
source: Error,
},
SourceTooLarge {
bytes: u64,
},
UnstableSnapshot,
Diff(DiffError),
}Expand description
An error from repository discovery, Git execution, or worktree access.
Variants§
NotRepository
The supplied location is not inside a Git worktree.
UnsupportedRepositoryPath
Git returned a repository root that cannot be represented as UTF-8.
InvalidPath(RepoPathError)
A repository-relative path failed validation.
PathEscapesRepository
A validated path resolved outside the repository root.
NotAFile
A file operation unexpectedly targeted a directory.
EmptyCommitMessage
A commit message was empty or only whitespace.
Spawn
The Git process could not be started or awaited.
Fields
CommandFailed
Git exited unsuccessfully.
stderr is retained for diagnostics, but omitted from Display to
avoid leaking file contents or other sensitive command output.
Fields
Io
A filesystem operation failed.
SourceTooLarge
A source version exceeded the per-file capture limit.
UnstableSnapshot
Repository metadata or worktree content changed during capture.
Diff(DiffError)
Core diff normalization failed.
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 WatchError
impl From<GitError> for WatchError
Source§fn from(source: GitError) -> WatchError
fn from(source: GitError) -> WatchError
Source§impl From<RepoPathError> for GitError
impl From<RepoPathError> for GitError
Source§fn from(source: RepoPathError) -> GitError
fn from(source: RepoPathError) -> GitError
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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> IntoMaybeUndefined<T> for T
impl<T> IntoMaybeUndefined<T> for T
Source§fn into_maybe_undefined(self) -> MaybeUndefined<T>
fn into_maybe_undefined(self) -> MaybeUndefined<T>
Source§impl<T> IntoOption<T> for T
impl<T> IntoOption<T> for T
Source§fn into_option(self) -> Option<T>
fn into_option(self) -> Option<T>
impl<T> MaybeSend for Twhere
T: Send,
Source§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
Source§impl<T> ToCompactString for Twhere
T: Display,
impl<T> ToCompactString for Twhere
T: Display,
Source§fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
ToCompactString::to_compact_string() Read moreSource§fn to_compact_string(&self) -> CompactString
fn to_compact_string(&self) -> CompactString
CompactString. Read more