pub enum MergeOutcome {
Clean,
Conflict {
files: Vec<String>,
},
RefusedPreMerge {
detail: String,
},
}Expand description
Outcome of a GitRepo::merge_no_ff into the current branch (roadmap M3).
A Conflict merge is always rolled back with git merge --abort before it
is returned, so the working tree is left clean either way — the caller never
has to clean up a half-merged tree. A RefusedPreMerge failure never had a
merge in progress (no MERGE_HEAD), so no abort is attempted — there is
nothing to roll back.
Variants§
Clean
The branch merged cleanly; the merge commit is on the current branch.
Conflict
The merge hit conflicts and was aborted. files lists the conflicting
paths git reported (best-effort; empty when git named none).
RefusedPreMerge
Git refused the merge before it started (no MERGE_HEAD was ever
created) — e.g. an untracked file at a path the merge would bring in.
detail is git’s verbatim stderr/stdout for the failed merge command.
No git merge --abort is attempted, since there is no merge in
progress to abort.
Trait Implementations§
Source§impl Clone for MergeOutcome
impl Clone for MergeOutcome
Source§fn clone(&self) -> MergeOutcome
fn clone(&self) -> MergeOutcome
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more