pub enum RepairMode {
Truncate,
TruncateBestEffort,
RewriteHistory {
target_branch: Option<String>,
},
}Expand description
Repair mode determines how corruption is handled.
Variants§
Truncate
Move refs to recovery boundary, discarding broken commits. This is the safe, recommended option. Requires a complete healthy chain from root.
TruncateBestEffort
Like Truncate, but uses the newest healthy commit even if its ancestors are broken. Use when there’s no contiguous healthy chain. Warning: History before the target commit may be incomplete.
RewriteHistory
Rewrite commits from recovery boundary to HEAD, skipping broken ones. Preserves partial content but invalidates all commit signatures.
Implementations§
Source§impl RepairMode
impl RepairMode
Sourcepub fn is_best_effort(&self) -> bool
pub fn is_best_effort(&self) -> bool
Returns true if this mode uses best-effort (tolerates broken ancestors).
Trait Implementations§
Source§impl Clone for RepairMode
impl Clone for RepairMode
Source§fn clone(&self) -> RepairMode
fn clone(&self) -> RepairMode
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for RepairMode
impl Debug for RepairMode
Source§impl Default for RepairMode
impl Default for RepairMode
Source§impl PartialEq for RepairMode
impl PartialEq for RepairMode
impl Eq for RepairMode
impl StructuralPartialEq for RepairMode
Auto Trait Implementations§
impl Freeze for RepairMode
impl RefUnwindSafe for RepairMode
impl Send for RepairMode
impl Sync for RepairMode
impl Unpin for RepairMode
impl UnsafeUnpin for RepairMode
impl UnwindSafe for RepairMode
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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