pub enum WorktreeAction {
List {
target: Utf8PathBuf,
json: bool,
},
Add {
branch: String,
target: Utf8PathBuf,
base: Option<String>,
apply: bool,
json: bool,
},
Prune {
target: Utf8PathBuf,
repo: Option<String>,
forge: Option<String>,
verify: bool,
apply: bool,
quiet: bool,
json: bool,
},
}Expand description
The worktree verbs, mode-free by design: they behave identically under the worktree and branches workflows.
Variants§
List
Report every worktree of the repository, offline.
Fields
target: Utf8PathBufThe repository to read; any of its worktrees names it.
Add
Create or adopt one branch’s worktree at the sibling path
../<project>-<flattened branch>; preview by default.
Fields
branch: StringThe branch to seat: an existing local branch is adopted, a lone matching remote tip becomes a tracking branch, and anything else is created from –base or the refreshed trunk.
target: Utf8PathBufThe repository to act on; any of its worktrees names it.
Prune
Report the worktrees a squash merge retired — stale records and gone upstreams, never healthy seats — and remove only the forge-confirmed ones, and only under –apply.
Fields
target: Utf8PathBufThe repository to read; any of its worktrees names it.
Trait Implementations§
Source§impl Debug for WorktreeAction
impl Debug for WorktreeAction
Source§impl FromArgMatches for WorktreeAction
impl FromArgMatches for WorktreeAction
Source§fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>
fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>
Source§fn from_arg_matches_mut(
__clap_arg_matches: &mut ArgMatches,
) -> Result<Self, Error>
fn from_arg_matches_mut( __clap_arg_matches: &mut ArgMatches, ) -> Result<Self, Error>
Source§fn update_from_arg_matches(
&mut self,
__clap_arg_matches: &ArgMatches,
) -> Result<(), Error>
fn update_from_arg_matches( &mut self, __clap_arg_matches: &ArgMatches, ) -> Result<(), Error>
ArgMatches to self.Source§fn update_from_arg_matches_mut<'b>(
&mut self,
__clap_arg_matches: &mut ArgMatches,
) -> Result<(), Error>
fn update_from_arg_matches_mut<'b>( &mut self, __clap_arg_matches: &mut ArgMatches, ) -> Result<(), Error>
ArgMatches to self.Source§impl Subcommand for WorktreeAction
impl Subcommand for WorktreeAction
Source§fn augment_subcommands<'b>(__clap_app: Command) -> Command
fn augment_subcommands<'b>(__clap_app: Command) -> Command
Source§fn augment_subcommands_for_update<'b>(__clap_app: Command) -> Command
fn augment_subcommands_for_update<'b>(__clap_app: Command) -> Command
Command so it can instantiate self via
FromArgMatches::update_from_arg_matches_mut Read moreSource§fn has_subcommand(__clap_name: &str) -> bool
fn has_subcommand(__clap_name: &str) -> bool
Self can parse a specific subcommand