pub struct RemoveOptions {
pub force_remove: bool,
pub force_branch: bool,
pub keep_branch: bool,
pub no_hooks: bool,
pub unlock: bool,
}Expand description
Options for Workspace::remove. The worktree-removal force is decoupled
from the branch-deletion force: the TUI confirm dialog forces removal of a
dirty worktree without ever force-deleting an unmerged branch (spec §10/§12).
Fields§
§force_remove: boolSkip the dirty/unpushed guards and pass --force to
git worktree remove.
force_branch: boolPermit deleting a branch that is not fully merged into its base.
keep_branch: boolAlways keep the local branch.
no_hooks: boolSkip the pre_remove hook.
unlock: boolRemove the worktree even when it is locked (git worktree lock),
passing --force twice to git worktree remove. Without it a locked
worktree is refused with Error::WorktreeLocked before the hook runs.
Independent of Self::force_remove, as wt prune --locked is of
--force (issue #126).
Trait Implementations§
Source§impl Clone for RemoveOptions
impl Clone for RemoveOptions
impl Copy for RemoveOptions
Source§impl Debug for RemoveOptions
impl Debug for RemoveOptions
Auto Trait Implementations§
impl Forget for RemoveOptions
impl Freeze for RemoveOptions
impl Move for RemoveOptions
impl RefUnwindSafe for RemoveOptions
impl Send for RemoveOptions
impl Sync for RemoveOptions
impl Unpin for RemoveOptions
impl UnsafeUnpin for RemoveOptions
impl UnwindSafe for RemoveOptions
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<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> ⓘ
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