Skip to main content

GitCommand

Enum GitCommand 

Source
#[non_exhaustive]
pub enum GitCommand {
Show 30 variants Status, Diff { cached: bool, }, Log { maximum: u32, }, Show { object: Option<GitObjectName>, }, Add { paths: Vec<String>, }, Commit { message: String, author: String, authored_at_seconds: i64, }, Branch { create: Option<String>, }, Switch { branch: String, create: bool, }, Restore { source: Option<GitObjectName>, paths: Vec<String>, }, Reset { target: GitObjectName, mode: GitResetMode, }, Merge { branch: String, }, MergeContinue, MergeAbort, Rebase { branch: String, }, StashPush, StashPop, CherryPick { object: GitObjectName, }, Revert { object: GitObjectName, }, Tag { name: Option<String>, target: Option<GitObjectName>, delete: bool, }, Blame { path: String, }, Grep { pattern: String, path: Option<String>, }, Clean { dry_run: bool, }, Archive { object: Option<GitObjectName>, }, Apply { patch: Vec<u8>, }, Bisect { arguments: Vec<String>, }, RevParse { argument: String, }, SymbolicRef { short: bool, }, MergeBase { left: GitObjectName, right: GitObjectName, }, LsFiles, CheckIgnore { paths: Vec<String>, },
}
Expand description

Parsed Git-shaped command.

Variants (Non-exhaustive)§

This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
§

Status

Compare compatibility HEAD with the live workspace.

§

Diff

Diff HEAD-to-workspace; cached has identical semantics.

Fields

§cached: bool

Whether the caller used --cached; behavior is identical without an index.

§

Log

Walk explicit compatibility history.

Fields

§maximum: u32

Maximum first-parent commits to return.

§

Show

Inspect one compatibility commit.

Fields

§object: Option<GitObjectName>

Object to show, defaulting to HEAD.

§

Add

Accepted no-op because changes are always staged.

Fields

§paths: Vec<String>

Accepted pathspecs; staging remains automatic.

§

Commit

Capture the complete eligible workspace state.

Fields

§message: String

Commit message.

§author: String

Author identity.

§authored_at_seconds: i64

Signed Unix epoch time.

§

Branch

List or create a branch.

Fields

§create: Option<String>

Optional branch to create before listing.

§

Switch

Select a branch, optionally creating it first.

Fields

§branch: String

Destination branch.

§create: bool

Whether to create a missing destination.

§

Restore

Restore paths from an object.

Fields

§source: Option<GitObjectName>

Source object, defaulting to HEAD.

§paths: Vec<String>

Portable paths to restore.

§

Reset

Move HEAD and optionally the workspace.

Fields

§target: GitObjectName

Commit-like target.

§mode: GitResetMode

Workspace restoration policy.

§

Merge

Join another compatibility branch.

Fields

§branch: String

Source branch.

§

MergeContinue

Continue the one durable conflicted merge after ordinary workspace edits.

§

MergeAbort

Restore the pre-merge working tree and clear the durable merge intent.

§

Rebase

Rebase onto another compatibility branch.

Fields

§branch: String

New base branch.

§

StashPush

Stash the complete working generation.

§

StashPop

Restore and remove the newest stash.

§

CherryPick

Apply one commit as a cherry-pick.

Fields

§object: GitObjectName

Commit to apply.

§

Revert

Invert one explicit commit.

Fields

§object: GitObjectName

Commit to invert.

§

Tag

List, create, or delete a lightweight tag.

Fields

§name: Option<String>

Optional tag name; omission lists tags.

§target: Option<GitObjectName>

Target object, defaulting to HEAD.

§delete: bool

Whether to delete instead of create.

§

Blame

Attribute lines to compatibility commits.

Fields

§path: String

Portable path to attribute.

§

Grep

Search one live or historical tree.

Fields

§pattern: String

Search pattern interpreted by the executor.

§path: Option<String>

Optional subtree path.

§

Clean

Remove untracked, non-ignored paths.

Fields

§dry_run: bool

Whether to report candidates without mutation.

§

Archive

Export one compatibility tree.

Fields

§object: Option<GitObjectName>

Object to archive, defaulting to the workspace.

§

Apply

Apply a patch to the working workspace.

Fields

§patch: Vec<u8>

Opaque patch bytes.

§

Bisect

Advance a caller-directed bisect session.

Fields

§arguments: Vec<String>

Bisect subcommand and arguments.

§

RevParse

Resolve one compatibility revision or a small read-only probe.

Fields

§argument: String

Probe or object name accepted by the compatibility subset.

§

SymbolicRef

Print the symbolic compatibility HEAD.

Fields

§short: bool

Whether to omit the refs/heads/ prefix.

§

MergeBase

Find the nearest common explicit compatibility commit.

Fields

§left: GitObjectName

First commit-like object.

§right: GitObjectName

Second commit-like object.

§

LsFiles

List paths tracked by explicit compatibility history.

§

CheckIgnore

Test paths against the live compatibility ignore policy.

Fields

§paths: Vec<String>

Portable paths to test.

Trait Implementations§

Source§

impl Clone for GitCommand

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

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

Performs copy-assignment from source. Read more
Source§

impl Debug for GitCommand

Source§

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

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

impl<'de> Deserialize<'de> for GitCommand

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Eq for GitCommand

Source§

impl PartialEq for GitCommand

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl Serialize for GitCommand

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl StructuralPartialEq for GitCommand

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<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

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> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

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

Source§

fn from_ref(input: &T) -> T

Converts to this type from a reference to the input type.
Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self> ⓘ

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self> ⓘ

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
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> IntoRequest<T> for T

Source§

fn into_request(self) -> Request<T>

Wrap the input message T in a tonic::Request
Source§

impl<L> LayerExt<L> for L

Source§

fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>
where L: Layer<S>,

Applies the layer to a service and wraps it in Layered.
Source§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> StorageFuture for T
where T: Send,

Source§

impl<T> StorageProvider for T
where T: Send + Sync + ?Sized,

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 = !

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

fn try_from(value: U) -> Result<T, !>

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

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘ
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more