pub enum Command {
Show 25 variants Amend { move_options: MoveOptions, }, BugReport, Checkout { checkout_options: CheckoutOptions, }, Gc, Hide { commits: Vec<String>, recursive: bool, }, HookDetectEmptyCommit { old_commit_oid: String, }, HookPreAutoGc, HookPostCheckout { previous_commit: String, current_commit: String, is_branch_checkout: isize, }, HookPostCommit, HookPostMerge { is_squash_merge: isize, }, HookPostRewrite { rewrite_type: String, }, HookReferenceTransaction { transaction_state: String, }, HookRegisterExtraPostRewriteHook, HookSkipUpstreamAppliedCommit { commit_oid: String, }, Init { uninstall: bool, main_branch_name: Option<String>, }, Move { source: Option<String>, base: Option<String>, dest: Option<String>, move_options: MoveOptions, }, Next { traverse_commits_options: TraverseCommitsOptions, }, Prev { traverse_commits_options: TraverseCommitsOptions, }, Restack { commits: Vec<String>, move_options: MoveOptions, }, Reword { commits: Vec<String>, messages: Vec<String>, discard: bool, }, Smartlog { show_hidden_commits: bool, only_show_branches: bool, }, Sync { update_refs: bool, force: bool, move_options: MoveOptions, commits: Vec<String>, }, Undo { interactive: bool, }, Unhide { commits: Vec<String>, recursive: bool, }, Wrap { git_executable: Option<PathBuf>, command: WrappedCommand, },
}
Expand description

FIXME: write man-page text

Variants

Amend

Fields

move_options: MoveOptions

Options for moving commits.

Amend the current HEAD commit.

BugReport

Gather information about recent operations to upload as part of a bug report.

Checkout

Fields

checkout_options: CheckoutOptions

Options for checking out a commit.

Check out a given commit.

Gc

Run internal garbage collection.

Hide

Fields

commits: Vec<String>

Zero or more commits to hide.

Can either be hashes, like abc123, or ref-specs, like HEAD^.

recursive: bool

Also recursively hide all visible children commits of the provided commits.

Hide the provided commits from the smartlog.

HookDetectEmptyCommit

Fields

old_commit_oid: String

The OID of the commit currently being applied, to be checked for emptiness.

Internal use.

HookPreAutoGc

Internal use.

HookPostCheckout

Fields

previous_commit: String

The previous commit OID.

current_commit: String

The current commit OID.

is_branch_checkout: isize

Whether or not this was a branch checkout (versus a file checkout).

Internal use.

HookPostCommit

Internal use.

HookPostMerge

Fields

is_squash_merge: isize

Whether or not this is a squash merge. See githooks(5).

Internal use.

HookPostRewrite

Fields

rewrite_type: String

One of amend or rebase.

Internal use.

HookReferenceTransaction

Fields

transaction_state: String

One of prepared, committed, or aborted. See githooks(5).

Internal use.

HookRegisterExtraPostRewriteHook

Internal use.

HookSkipUpstreamAppliedCommit

Fields

commit_oid: String

The OID of the commit that was skipped.

Internal use.

Init

Fields

uninstall: bool

Uninstall the branchless workflow instead of initializing it.

main_branch_name: Option<String>

Use the provided name as the name of the main branch.

If not set, it will be auto-detected. If it can’t be auto-detected, then you will be prompted to enter a value for the main branch name.

Initialize the branchless workflow for this repository.

Move

Fields

source: Option<String>

The source commit to move. This commit, and all of its descendants, will be moved.

base: Option<String>

A commit inside a subtree to move. The entire subtree, starting from the main branch, will be moved, not just the commits descending from this commit.

dest: Option<String>

The destination commit to move all source commits onto. If not provided, defaults to the current commit.

move_options: MoveOptions

Options for moving commits.

Move a subtree of commits from one location to another.

By default, git move tries to move the entire current stack if you don’t pass a --source or --base option (equivalent to writing --base HEAD).

By default, git move attempts to rebase all commits in-memory. If you want to force an on-disk rebase, pass the --on-disk flag. Note that post-commit hooks are not called during in-memory rebases.

Next

Fields

traverse_commits_options: TraverseCommitsOptions

Options for traversing commits.

Move to a later commit in the current stack.

Prev

Fields

traverse_commits_options: TraverseCommitsOptions

Options for traversing commits.

Move to an earlier commit in the current stack.

Restack

Fields

commits: Vec<String>

The IDs of the abandoned commits whose descendants should be restacked. If not provided, all abandoned commits are restacked.

move_options: MoveOptions

Options for moving commits.

Fix up commits abandoned by a previous rewrite operation.

Reword

Fields

commits: Vec<String>

Zero or more commits to reword. If not provided, defaults to “HEAD”.

Can either be hashes, like abc123, or ref-specs, like HEAD^.

messages: Vec<String>

Message to apply to commits. Multiple messages will be combined as separate paragraphs, similar to git commit.

discard: bool

Throw away the original commit messages.

If commit.template is set, then the editor is pre-populated with that; otherwise, the editor starts empty.

Reword commits.

Smartlog

Fields

show_hidden_commits: bool

Also show commits which have been hidden.

only_show_branches: bool

Only show commits that exist on a branch.

Display a nice graph of the commits you’ve recently worked on.

Sync

Fields

update_refs: bool

Run git fetch to update remote references before carrying out the sync.

force: bool

Force rebasing commits even if they’re already based on top of their destination.

move_options: MoveOptions

Options for moving commits.

commits: Vec<String>

The commits whose stacks will be moved on top of the main branch. If no commits are provided, all draft commits will be synced.

Can either be hashes, like abc123, or ref-specs, like HEAD^.

Move any local commit stacks on top of the main branch.

Undo

Fields

interactive: bool

Interactively browse through previous states of the repository before selecting one to return to.

Browse or return to a previous state of the repository.

Unhide

Fields

commits: Vec<String>

Zero or more commits to unhide.

Can either be hashes, like abc123, or ref-specs, like HEAD^.

recursive: bool

Also recursively unhide all children commits of the provided commits.

Unhide previously-hidden commits from the smartlog.

Wrap

Fields

git_executable: Option<PathBuf>

The git executable to invoke.

command: WrappedCommand

The arguments to pass to git.

Wrap a Git command inside a branchless transaction.

Trait Implementations

👎 Deprecated since 3.1.0:

Replaced with `CommandFactory::command

Deprecated, replaced with CommandFactory::command

👎 Deprecated since 3.1.0:

Replaced with `CommandFactory::command_for_update

Deprecated, replaced with CommandFactory::command_for_update

Build an Command that can instantiate Self. Read more

Build an Command that can update self. Read more

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

Assign values from ArgMatches to self.

Parse from std::env::args_os(), exit on error

Parse from std::env::args_os(), return Err on error.

Parse from iterator, exit on error

Parse from iterator, return Err on error.

Update from iterator, exit on error

Update from iterator, return Err on error.

Append to Command so it can instantiate Self. Read more

Append to Command so it can update self. Read more

Test whether Self can parse a specific subcommand

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

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

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Calls U::from(self).

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

Set the foreground color generically Read more

Set the background color generically. Read more

Change the foreground color to black

Change the background color to black

Change the foreground color to red

Change the background color to red

Change the foreground color to green

Change the background color to green

Change the foreground color to yellow

Change the background color to yellow

Change the foreground color to blue

Change the background color to blue

Change the foreground color to magenta

Change the background color to magenta

Change the foreground color to purple

Change the background color to purple

Change the foreground color to cyan

Change the background color to cyan

Change the foreground color to white

Change the background color to white

Change the foreground color to the terminal default

Change the background color to the terminal default

Change the foreground color to bright black

Change the background color to bright black

Change the foreground color to bright red

Change the background color to bright red

Change the foreground color to bright green

Change the background color to bright green

Change the foreground color to bright yellow

Change the background color to bright yellow

Change the foreground color to bright blue

Change the background color to bright blue

Change the foreground color to bright magenta

Change the background color to bright magenta

Change the foreground color to bright purple

Change the background color to bright purple

Change the foreground color to bright cyan

Change the background color to bright cyan

Change the foreground color to bright white

Change the background color to bright white

Make the text bold

Make the text dim

Make the text italicized

Make the text italicized

Make the text blink

Make the text blink (but fast!)

Swap the foreground and background colors

Hide the text

Cross out the text

Set the foreground color at runtime. Only use if you do not know which color will be used at compile-time. If the color is constant, use either OwoColorize::fg or a color-specific method, such as OwoColorize::green, Read more

Set the background color at runtime. Only use if you do not know what color to use at compile-time. If the color is constant, use either OwoColorize::bg or a color-specific method, such as OwoColorize::on_yellow, Read more

Set the foreground color to a specific RGB value.

Set the background color to a specific RGB value.

Sets the foreground color to an RGB value.

Sets the background color to an RGB value.

Apply a runtime-determined style

The alignment of pointer.

The type for initializers.

Initializes a with the given initializer. Read more

Dereferences the given pointer. Read more

Mutably dereferences the given pointer. Read more

Drops the object pointed to by the given pointer. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

Calls the given closure and return the result. Read more

Calls the given closure on self.

Calls the given closure on self.

Calls the given closure if condition == true.

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

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