pub enum GitError {
Show 28 variants
WorktreeCreation {
reason: String,
},
WorktreePathExists {
path: PathBuf,
},
WorktreeNotFound {
path: PathBuf,
},
MutationDenied {
state: WorktreeState,
},
PathConfinementViolation {
path: PathBuf,
root: PathBuf,
},
DirtyWorktree {
path: PathBuf,
},
DetachedHead {
path: PathBuf,
},
InvalidGitIndirection {
path: PathBuf,
},
CleanupBlocked {
reason: String,
},
MergePrecheckFailed {
reason: String,
},
TargetRefStale {
expected: String,
actual: String,
},
MergeConflict {
count: usize,
},
HookRejected {
hook: String,
stderr: String,
},
MergeLockUnavailable {
branch: String,
},
MergeVerifyFailed {
reason: String,
},
InvalidMergeState {
state: MergeState,
},
UninitializedSubmodule {
path: String,
},
DirtySubmodule {
path: String,
},
SubmodulePolicyViolation {
path: String,
reason: String,
},
ForbiddenOperation {
operation: ForbiddenOp,
},
InterruptedOperation {
operation: InterruptedOp,
path: PathBuf,
},
RecoveryFailed {
reason: String,
},
RefNotFound {
refspec: String,
},
BranchAlreadyExists {
branch: String,
},
CommandFailed {
exit_code: i32,
stderr: String,
},
Io(Error),
Transition(TransitionError),
Exec(ExecError),
}Expand description
Top-level error type for all git-plane operations.
Variants§
WorktreeCreation
Failed to create a worktree (Section 12.2).
WorktreePathExists
Worktree path already exists on disk.
WorktreeNotFound
Worktree not found at expected path.
MutationDenied
A command tried to mutate the repository from an invalid worktree state. Section 12.3: mutations denied in WtUnbound/WtClosed/WtCleanupPending.
Fields
state: WorktreeStatePathConfinementViolation
Path traversal outside worktree root detected (Section 12.3).
DirtyWorktree
The worktree has uncommitted changes when a clean state is required.
DetachedHead
Detached HEAD without explicit override policy (Section 12.3).
InvalidGitIndirection
The .git indirection file is missing or invalid (Section 12.2 step 5).
CleanupBlocked
Cleanup preconditions not met (Section 12.11).
MergePrecheckFailed
Merge precheck failed (Section 12.6).
TargetRefStale
Target ref moved since precheck — must restart (Section 12.8 step 2).
MergeConflict
Merge conflicts detected (Section 12.7, 12.9).
HookRejected
A git hook rejected the merge commit (e.g. commit-msg, pre-commit). Distinct from MergeConflict — the merge content was clean but a hook blocked the commit.
Could not acquire merge lock for the target branch (Section 12.8).
MergeVerifyFailed
Merge verification failed after apply (Section 12.8 step 4).
InvalidMergeState
Merge operation attempted in an invalid merge state.
Fields
state: MergeStateUninitializedSubmodule
Uninitialized submodule detected before task start.
DirtySubmodule
Dirty submodule detected before merge.
SubmodulePolicyViolation
Submodule update violates the configured policy mode.
ForbiddenOperation
A forbidden git operation was attempted without policy approval.
Fields
operation: ForbiddenOpInterruptedOperation
An interrupted git operation was detected on recovery.
RecoveryFailed
Recovery action failed.
RefNotFound
A ref (branch/tag/sha) could not be resolved.
BranchAlreadyExists
Branch already exists when expecting to create a new one.
CommandFailed
Git command returned a non-zero exit code.
Io(Error)
I/O error from filesystem or process operations.
Transition(TransitionError)
State transition error from yarli-core.
Exec(ExecError)
Exec error from yarli-exec command runner.
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<TransitionError> for GitError
impl From<TransitionError> for GitError
Source§fn from(source: TransitionError) -> Self
fn from(source: TransitionError) -> Self
Auto Trait Implementations§
impl Freeze for GitError
impl !RefUnwindSafe for GitError
impl Send for GitError
impl Sync for GitError
impl Unpin for GitError
impl UnsafeUnpin for GitError
impl !UnwindSafe 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> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
Source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
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> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::RequestSource§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt 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 moreSource§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.