pub enum WorktreeCommand {
Show 17 variants
Status,
List,
Topology,
Root,
Path {
branch: String,
},
Inspect {
branch: String,
},
Create {
branch: Option<String>,
base: Option<String>,
issue: Option<String>,
},
Ensure {
branch: String,
base: Option<String>,
},
Migrate {
plan: bool,
dry_run: bool,
allow_copy: bool,
only: Vec<String>,
include_ephemeral: bool,
},
Validate,
Doctor,
Guard {
quiet: bool,
},
Repair {
dry_run: bool,
},
Remove {
selector: String,
force: bool,
},
Cleanup {
remove: bool,
},
Uncommitted {
older_than: Option<String>,
},
Branches {
without_worktree: bool,
},
}Expand description
The subcommands of majordomus worktree.
Variants§
Status
Where this call is — branch, worktree, canonical or not, uncommitted work — and how many errors the whole topology carries; exit 10 when this worktree is out of place
List
Every registered worktree with its standing, one line each; exit 10 when the topology has an error
Topology
The whole topology: repository, container, trunk, every worktree, every branch without a worktree, every diagnostic; exit 10 when it has an error
Root
Print the container every linked worktree belongs under, and nothing else: cd "$(majordomus worktree root)"
Path
Print the canonical path of a branch, and nothing else: cd "$(majordomus worktree path feature/x)". Derived from the name; the branch need not exist
Inspect
One branch: its canonical path, whether it exists, what occupies the path, the worktree holding it, and what stands in the way
Create
Create the canonical worktree of a branch. A branch that does not exist here is fetched from the trunk’s remote and taken up when the remote has it; otherwise it is created from –base, else from the remote’s trunk fetched now (the local trunk only when the remote cannot be read, and then said, with how far behind). The path is derived; none may be given
Fields
Ensure
The canonical worktree of a branch: created when absent, answered when present, refused when the branch is checked out somewhere else
Fields
Migrate
Bring every misplaced worktree to its canonical path, dirty state included, with a fingerprint taken before and after each move; –plan shows the steps and changes nothing
Fields
Validate
Every error of the topology, and nothing else; exit 10 when there is one
Doctor
Every diagnostic of the topology, errors, warnings and facts, each with its code and remedy; exit 10 when there is an error
Guard
May a mutation proceed from here? Exit 0 in a canonical worktree, in the primary checkout on the trunk, or detached; exit 10 with the reason otherwise. What the pre-commit hook asks
Repair
Drop git’s registrations of worktrees whose directories are gone, and repair the administrative links of the ones that exist. Deletes no directory
Remove
Remove one linked worktree by branch or path. Never the primary checkout, never a branch, never uncommitted work without –force
Fields
Cleanup
The branches merged into the trunk whose worktree is clean or absent: what could be removed. Removes nothing without –remove
Fields
Uncommitted
Every linked worktree holding uncommitted work: how many paths, how old the oldest change, what holds it (an active task, an open episode, a process inside) and whether it is abandoned, with the command that would put it on a remote ref. Reads every worktree and writes none
Fields
Branches
Every local branch, one per line, for a shell completion that wants the live set
Trait Implementations§
Source§impl Debug for WorktreeCommand
impl Debug for WorktreeCommand
Source§impl FromArgMatches for WorktreeCommand
impl FromArgMatches for WorktreeCommand
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 WorktreeCommand
impl Subcommand for WorktreeCommand
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