Enum QueryCmd

Source
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.

Fields

§

Root

Prints the root dir of the repo

Fields

§

IsClean

Whether VCS repo is in a clean state, or has uncommitted work.

Fields

§

CurrentId

Print the VCS repo’s current revision ID (eg: rev in Mercurial, ref in git, etc).

Fields

§dirty_ok: bool

Whether to be silent about any answers being flawed, in the event IsClean is false.

§

CurrentName

Print the VCS repo’s current human-readable revision (eg: branch or tag in git, bookmark in jj)

Fields

§dirty_ok: bool

Whether to be silent about any answers being flawed, in the event IsClean is false.

§

ParentId

Print the VCS repo’s parent revision ID to the current point in history (eg: rev in Mercurial, ref in git, etc).

Fields

§

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

§max: u64

Max number of parents back to walk when seeking a parent with a hand-written ref name.

§

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.

Fields

§

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).

Fields

§clean_ok: bool
§

CurrentFiles

Prints what files were touched by the CurrentId

Fields

§dirty_ok: bool

Whether to be silent about any answers being flawed, in the event IsClean is false.

§

CheckHealth

Prints any system/$PATH info that might be useful for debugging issues this binary might have on your system.

Trait Implementations§

Source§

impl Clone for QueryCmd

Source§

fn clone(&self) -> QueryCmd

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for QueryCmd

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl FromArgMatches for QueryCmd

Source§

fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>

Instantiate Self from ArgMatches, parsing the arguments as needed. Read more
Source§

fn from_arg_matches_mut( __clap_arg_matches: &mut ArgMatches, ) -> Result<Self, Error>

Instantiate Self from ArgMatches, parsing the arguments as needed. Read more
Source§

fn update_from_arg_matches( &mut self, __clap_arg_matches: &ArgMatches, ) -> Result<(), Error>

Assign values from ArgMatches to self.
Source§

fn update_from_arg_matches_mut<'b>( &mut self, __clap_arg_matches: &mut ArgMatches, ) -> Result<(), Error>

Assign values from ArgMatches to self.
Source§

impl Subcommand for QueryCmd

Source§

fn augment_subcommands<'b>(__clap_app: Command) -> Command

Append to Command so it can instantiate Self via FromArgMatches::from_arg_matches_mut Read more
Source§

fn augment_subcommands_for_update<'b>(__clap_app: Command) -> Command

Append to Command so it can instantiate self via FromArgMatches::update_from_arg_matches_mut Read more
Source§

fn has_subcommand(__clap_name: &str) -> bool

Test whether Self can parse a specific subcommand

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.