pub enum QueryCmd {
Brand {
dir: QueryDir,
},
Root {
dir: QueryDir,
},
IsClean {
dir: QueryDir,
},
CurrentId {
dir: QueryDir,
dirty_ok: bool,
},
CurrentName {
dir: QueryDir,
dirty_ok: bool,
},
ParentId {
dir: QueryDir,
},
ParentName {
dir: QueryDir,
max: u64,
},
TrackedFiles {
dir: QueryDir,
},
DirtyFiles {
dir: QueryDir,
clean_ok: bool,
},
CurrentFiles {
dir: QueryDir,
dirty_ok: bool,
},
CheckHealth,
}
Expand description
Sub-commands of the CLI that map to a single VCS query.
Variants§
Brand
Prints the brand of the VCS repo, or exits non-zero if it’s not a known VCS repo.
Root
Prints the root dir of the repo
IsClean
Whether VCS repo is in a clean state, or has uncommitted work.
CurrentId
Print the VCS repo’s current revision ID (eg: rev in Mercurial, ref in git, etc).
Fields
CurrentName
Print the VCS repo’s current human-readable revision (eg: branch or tag in git, bookmark in jj)
Fields
ParentId
Print the VCS repo’s parent revision ID to the current point in history (eg: rev in Mercurial, ref in git, etc).
ParentName
Print the VCS repo’s parent revision’s human-readable revision name for the first parent it finds with one, or until it has stepped –max steps. Non-zero exit with no stderr output indicates one wasn’t found.
Fields
TrackedFiles
Lists filepaths tracked by this repo, ignoring the state of the repo (ie: any “staged” (git) or deleted “working-copy” (jj) edits. The goal of this listing is to show the full listing of the repository’s contents, as of the time of the current commit.
DirtyFiles
Lists filepaths touched that are the cause of the repo being dirty, or lists no output if
the repo isn’t dirty (thus can be used as a 1:1 proxy for IsClean
’s behavior).
CurrentFiles
Prints what files were touched by the CurrentId
Fields
CheckHealth
Prints any system/$PATH info that might be useful for debugging issues this binary might have on your system.
Trait Implementations§
Source§impl FromArgMatches for QueryCmd
impl FromArgMatches for QueryCmd
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 QueryCmd
impl Subcommand for QueryCmd
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