#[non_exhaustive]pub enum MergeError {
Show 19 variants
NotFastForward,
UnrelatedHistories {
ours: ObjectId,
theirs: ObjectId,
},
MergeCommit {
oid: ObjectId,
},
ReplaySourceAtHead,
SequencerUnknownCommand {
command: String,
},
ReplayContinueUnmerged,
ReplayContinueDirtyIndex,
ReplaySkipAlreadyCommitted,
NoReplayInProgress,
NoMergeInProgress,
OperationInProgress(InProgressOperation),
ContinueUnmergedPaths {
paths: Vec<String>,
},
ContinueResolvedNotStaged {
paths: Vec<String>,
},
ContinueEmptyMessage,
ReplayAlreadyInProgress,
MessageOverrideNotForMultiCommit,
MergeStateIncomplete {
missing: &'static str,
},
Pull(PullError),
SequencerCreatedParse {
detail: &'static str,
},
}Expand description
Merge, replay, and in-progress operation failures.
Wrapped by Error::Merge. Stable kind_name
slugs match the former umbrella variant names for scripts and the CLI error map.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
NotFastForward
A merge was requested with fast-forward only, but the histories diverged.
Merge histories share no common ancestor.
MergeCommit
Pick/revert does not replay merge commits without an explicit mainline.
ReplaySourceAtHead
Cherry-pick source is already checked out as HEAD.
SequencerUnknownCommand
Sequencer todo lists a command grit does not implement yet.
ReplayContinueUnmerged
Continue replay refuses while unmerged index entries remain.
ReplayContinueDirtyIndex
Continue replay with a dirty index after the step was already committed.
ReplaySkipAlreadyCommitted
Skip replay when the current step was already committed on a moved branch tip.
NoReplayInProgress
No cherry-pick or revert sequence is in progress.
NoMergeInProgress
No merge is in progress (abort/continue/skip).
OperationInProgress(InProgressOperation)
Another paused operation blocks the requested command.
ContinueUnmergedPaths
Stage-1/2/3 entries remain when finishing a merge.
ContinueResolvedNotStaged
Work tree resolved but index still has conflict stages.
ContinueEmptyMessage
Continue merge message would be empty after cleanup.
ReplayAlreadyInProgress
A pick/revert sequence is already in progress.
MessageOverrideNotForMultiCommit
message_override was set while replaying more than one commit.
MergeStateIncomplete
Merge or replay state on disk is incomplete for the requested operation.
Pull(PullError)
Pull-specific failure (no upstream, detached HEAD, rejected fetch).
SequencerCreatedParse
A .git/sequencer/created journal line could not be parsed.
Implementations§
Source§impl MergeError
impl MergeError
Sourcepub fn kind_name(&self) -> &'static str
pub fn kind_name(&self) -> &'static str
Stable snake_case slug for this failure (matches former Error::kind_name values).
Trait Implementations§
Source§impl Debug for MergeError
impl Debug for MergeError
Source§impl Display for MergeError
impl Display for MergeError
Source§impl Error for MergeError
impl Error for MergeError
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()