Struct git2::WorktreePruneOptions
source · pub struct WorktreePruneOptions { /* private fields */ }
Expand description
Options to configure how worktree pruning is performed
Implementations§
source§impl WorktreePruneOptions
impl WorktreePruneOptions
sourcepub fn new() -> WorktreePruneOptions
pub fn new() -> WorktreePruneOptions
Creates a default set of pruning options
By defaults this will prune only worktrees that are no longer valid unlocked and not checked out
sourcepub fn valid(&mut self, valid: bool) -> &mut WorktreePruneOptions
pub fn valid(&mut self, valid: bool) -> &mut WorktreePruneOptions
Controls whether valid (still existing on the filesystem) worktrees will be pruned
Defaults to false
sourcepub fn locked(&mut self, locked: bool) -> &mut WorktreePruneOptions
pub fn locked(&mut self, locked: bool) -> &mut WorktreePruneOptions
Controls whether locked worktrees will be pruned
Defaults to false
sourcepub fn working_tree(&mut self, working_tree: bool) -> &mut WorktreePruneOptions
pub fn working_tree(&mut self, working_tree: bool) -> &mut WorktreePruneOptions
Controls whether the actual working tree on the fs is recursively removed
Defaults to false
sourcepub fn raw(&mut self) -> *mut git_worktree_prune_options
pub fn raw(&mut self) -> *mut git_worktree_prune_options
Get a set of raw prune options to be used with git_worktree_prune