Enum git_branchless::opts::Command
source · pub enum Command {
Show 31 variants
Amend {
move_options: MoveOptions,
},
BugReport,
Gc,
Hide {
revsets: Vec<Revset>,
resolve_revset_options: ResolveRevsetOptions,
delete_branches: bool,
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: Vec<Revset>,
base: Vec<Revset>,
exact: Vec<Revset>,
dest: Option<Revset>,
resolve_revset_options: ResolveRevsetOptions,
move_options: MoveOptions,
insert: bool,
},
Next {
traverse_commits_options: TraverseCommitsOptions,
},
Prev {
traverse_commits_options: TraverseCommitsOptions,
},
Query {
revset: Revset,
resolve_revset_options: ResolveRevsetOptions,
show_branches: bool,
raw: bool,
},
Repair {
dry_run: bool,
},
Restack {
revsets: Vec<Revset>,
resolve_revset_options: ResolveRevsetOptions,
move_options: MoveOptions,
},
Record {
message: Option<String>,
interactive: bool,
detach: bool,
},
Reword {
revsets: Vec<Revset>,
resolve_revset_options: ResolveRevsetOptions,
force_rewrite_public_commits: bool,
messages: Vec<String>,
discard: bool,
commit_to_fixup: Option<Revset>,
},
Smartlog {
event_id: Option<isize>,
revset: Option<Revset>,
resolve_revset_options: ResolveRevsetOptions,
},
Snapshot {
subcommand: SnapshotSubcommand,
},
Submit {
create: bool,
revset: Revset,
resolve_revset_options: ResolveRevsetOptions,
},
Switch {
switch_options: SwitchOptions,
},
Sync {
pull: bool,
move_options: MoveOptions,
revsets: Vec<Revset>,
resolve_revset_options: ResolveRevsetOptions,
},
Test {
subcommand: TestSubcommand,
},
Undo {
interactive: bool,
yes: bool,
},
Unhide {
revsets: Vec<Revset>,
resolve_revset_options: ResolveRevsetOptions,
recursive: bool,
},
Wrap {
git_executable: Option<PathBuf>,
command: WrappedCommand,
},
}Expand description
FIXME: write man-page text
Variants
Amend
Fields
move_options: MoveOptionsOptions for moving commits.
Amend the current HEAD commit.
BugReport
Gather information about recent operations to upload as part of a bug report.
Gc
Run internal garbage collection.
Hide
Fields
resolve_revset_options: ResolveRevsetOptionsOptions for resolving revset expressions.
delete_branches: boolAlso delete any branches that are abandoned as a result of this hide.
recursive: boolAlso recursively hide all visible children commits of the provided commits.
Hide the provided commits from the smartlog.
HookDetectEmptyCommit
Fields
old_commit_oid: StringThe OID of the commit currently being applied, to be checked for emptiness.
Internal use.
HookPreAutoGc
Internal use.
HookPostCheckout
Fields
previous_commit: StringThe previous commit OID.
current_commit: StringThe current commit OID.
is_branch_checkout: isizeWhether or not this was a branch checkout (versus a file checkout).
Internal use.
HookPostCommit
Internal use.
HookPostMerge
Fields
is_squash_merge: isizeWhether or not this is a squash merge. See githooks(5).
Internal use.
HookPostRewrite
Fields
rewrite_type: StringOne of amend or rebase.
Internal use.
HookReferenceTransaction
Fields
transaction_state: StringOne of prepared, committed, or aborted. See githooks(5).
Internal use.
HookRegisterExtraPostRewriteHook
Internal use.
HookSkipUpstreamAppliedCommit
Fields
commit_oid: StringThe OID of the commit that was skipped.
Internal use.
Init
Fields
uninstall: boolUninstall the branchless workflow instead of initializing it.
Initialize the branchless workflow for this repository.
Move
Fields
source: Vec<Revset>The source commit to move. This commit, and all of its descendants, will be moved.
base: Vec<Revset>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.
exact: Vec<Revset>A set of specific commits to move. These will be removed from their current locations and any unmoved children will be moved to their nearest unmoved ancestor.
dest: Option<Revset>The destination commit to move all source commits onto. If not provided, defaults to the current commit.
resolve_revset_options: ResolveRevsetOptionsOptions for resolving revset expressions.
move_options: MoveOptionsOptions for moving commits.
insert: boolInsert the subtree between the destination and it’s children, if any. Only supported if the moved subtree has a single head.
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: TraverseCommitsOptionsOptions for traversing commits.
Move to a later commit in the current stack.
Prev
Fields
traverse_commits_options: TraverseCommitsOptionsOptions for traversing commits.
Move to an earlier commit in the current stack.
Query
Fields
revset: RevsetThe query to execute.
resolve_revset_options: ResolveRevsetOptionsOptions for resolving revset expressions.
show_branches: boolPrint the branches attached to the resulting commits, rather than the commits themselves.
raw: boolPrint the OID of each matching commit, one per line. This output is stable for use in scripts.
Query the commit graph using the “revset” language and print matching commits.
See https://github.com/arxanas/git-branchless/wiki/Reference:-Revsets to learn more about revsets.
The outputted commits are guaranteed to be topologically sorted, with ancestor commits appearing first.
Repair
Fields
dry_run: boolApply changes.
Restore internal invariants by reconciling the internal operation log with the state of the Git repository.
Restack
Fields
revsets: Vec<Revset>The IDs of the abandoned commits whose descendants should be restacked. If not provided, all abandoned commits are restacked.
resolve_revset_options: ResolveRevsetOptionsOptions for resolving revset expressions.
move_options: MoveOptionsOptions for moving commits.
Fix up commits abandoned by a previous rewrite operation.
Record
Fields
message: Option<String>The commit message to use. If not provided, will be prompted to provide a commit message interactively.
interactive: boolSelect changes to include interactively, rather than using the current staged/unstaged changes.
detach: boolDetach the current branch before committing.
Create a commit by interactively selecting which changes to include.
Reword
Fields
resolve_revset_options: ResolveRevsetOptionsOptions for resolving revset expressions.
force_rewrite_public_commits: boolForce rewording public commits, even though other people may have access to those commits.
messages: Vec<String>Message to apply to commits. Multiple messages will be combined as separate paragraphs,
similar to git commit.
discard: boolThrow 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
event_id: Option<isize>The point in time at which to show the smartlog. If not provided, renders the smartlog as of the current time. If negative, is treated as an offset from the current event.
revset: Option<Revset>The commits to render. These commits, plus any related commits, will be rendered.
resolve_revset_options: ResolveRevsetOptionsOptions for resolving revset expressions.
Display a nice graph of the commits you’ve recently worked on.
Snapshot
Fields
subcommand: SnapshotSubcommandThe subcommand to run.
Manage working copy snapshots.
Submit
Fields
create: boolIf there is no remote branch for a given local branch, create the remote branch by pushing the local branch to the default push remote.
You can configure the default push remote with git config remote.pushDefault <remote>.
revset: RevsetThe commits to push. All branches attached to those commits will be pushed.
resolve_revset_options: ResolveRevsetOptionsOptions for resolving revset expressions.
Push commits to a remote.
Switch
Fields
switch_options: SwitchOptionsOptions for switching.
Switch to the provided branch or commit.
Sync
Fields
pull: boolRun git fetch to update remote references before carrying out the
sync.
move_options: MoveOptionsOptions for moving commits.
revsets: Vec<Revset>The commits whose stacks will be moved on top of the main branch. If no commits are provided, all draft commits will be synced.
resolve_revset_options: ResolveRevsetOptionsOptions for resolving revset expressions.
Move any local commit stacks on top of the main branch.
Test
Fields
subcommand: TestSubcommandThe subcommand to run.
Run a command on each commit in a given set and aggregate the results.
Undo
Fields
interactive: boolInteractively browse through previous states of the repository before selecting one to return to.
yes: boolSkip confirmation and apply changes immediately.
Browse or return to a previous state of the repository.
Unhide
Fields
resolve_revset_options: ResolveRevsetOptionsOptions for resolving revset expressions.
recursive: boolAlso recursively unhide all children commits of the provided commits.
Unhide previously-hidden commits from the smartlog.
Wrap
Fields
command: WrappedCommandThe arguments to pass to git.
Wrap a Git command inside a branchless transaction.
Trait Implementations
sourceimpl CommandFactory for Command
impl CommandFactory for Command
sourceimpl FromArgMatches for Command
impl FromArgMatches for Command
sourcefn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>
fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>
sourcefn 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>
sourcefn 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.sourcefn 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.sourceimpl Parser for Command
impl Parser for Command
sourcefn try_parse() -> Result<Self, Error<RichFormatter>>
fn try_parse() -> Result<Self, Error<RichFormatter>>
std::env::args_os(), return Err on error.sourcefn parse_from<I, T>(itr: I) -> Selfwhere
I: IntoIterator<Item = T>,
T: Into<OsString> + Clone,
fn parse_from<I, T>(itr: I) -> Selfwhere
I: IntoIterator<Item = T>,
T: Into<OsString> + Clone,
sourcefn try_parse_from<I, T>(itr: I) -> Result<Self, Error<RichFormatter>>where
I: IntoIterator<Item = T>,
T: Into<OsString> + Clone,
fn try_parse_from<I, T>(itr: I) -> Result<Self, Error<RichFormatter>>where
I: IntoIterator<Item = T>,
T: Into<OsString> + Clone,
sourcefn update_from<I, T>(&mut self, itr: I)where
I: IntoIterator<Item = T>,
T: Into<OsString> + Clone,
fn update_from<I, T>(&mut self, itr: I)where
I: IntoIterator<Item = T>,
T: Into<OsString> + Clone,
sourcefn try_update_from<I, T>(&mut self, itr: I) -> Result<(), Error<RichFormatter>>where
I: IntoIterator<Item = T>,
T: Into<OsString> + Clone,
fn try_update_from<I, T>(&mut self, itr: I) -> Result<(), Error<RichFormatter>>where
I: IntoIterator<Item = T>,
T: Into<OsString> + Clone,
sourceimpl Subcommand for Command
impl Subcommand for Command
sourcefn augment_subcommands<'b>(__clap_app: Command) -> Command
fn augment_subcommands<'b>(__clap_app: Command) -> Command
sourcefn augment_subcommands_for_update<'b>(__clap_app: Command) -> Command
fn augment_subcommands_for_update<'b>(__clap_app: Command) -> Command
sourcefn has_subcommand(__clap_name: &str) -> bool
fn has_subcommand(__clap_name: &str) -> bool
Self can parse a specific subcommandAuto Trait Implementations
impl RefUnwindSafe for Command
impl Send for Command
impl Sync for Command
impl Unpin for Command
impl UnwindSafe for Command
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
impl<D> OwoColorize for D
impl<D> OwoColorize for D
fn fg<C>(&self) -> FgColorDisplay<'_, C, Self>where
C: Color,
fn fg<C>(&self) -> FgColorDisplay<'_, C, Self>where
C: Color,
fn bg<C>(&self) -> BgColorDisplay<'_, C, Self>where
C: Color,
fn bg<C>(&self) -> BgColorDisplay<'_, C, Self>where
C: Color,
fn black<'a>(&'a self) -> FgColorDisplay<'a, Black, Self>
fn black<'a>(&'a self) -> FgColorDisplay<'a, Black, Self>
fn on_black<'a>(&'a self) -> BgColorDisplay<'a, Black, Self>
fn on_black<'a>(&'a self) -> BgColorDisplay<'a, Black, Self>
fn red<'a>(&'a self) -> FgColorDisplay<'a, Red, Self>
fn red<'a>(&'a self) -> FgColorDisplay<'a, Red, Self>
fn on_red<'a>(&'a self) -> BgColorDisplay<'a, Red, Self>
fn on_red<'a>(&'a self) -> BgColorDisplay<'a, Red, Self>
fn green<'a>(&'a self) -> FgColorDisplay<'a, Green, Self>
fn green<'a>(&'a self) -> FgColorDisplay<'a, Green, Self>
fn on_green<'a>(&'a self) -> BgColorDisplay<'a, Green, Self>
fn on_green<'a>(&'a self) -> BgColorDisplay<'a, Green, Self>
fn yellow<'a>(&'a self) -> FgColorDisplay<'a, Yellow, Self>
fn yellow<'a>(&'a self) -> FgColorDisplay<'a, Yellow, Self>
fn on_yellow<'a>(&'a self) -> BgColorDisplay<'a, Yellow, Self>
fn on_yellow<'a>(&'a self) -> BgColorDisplay<'a, Yellow, Self>
fn blue<'a>(&'a self) -> FgColorDisplay<'a, Blue, Self>
fn blue<'a>(&'a self) -> FgColorDisplay<'a, Blue, Self>
fn on_blue<'a>(&'a self) -> BgColorDisplay<'a, Blue, Self>
fn on_blue<'a>(&'a self) -> BgColorDisplay<'a, Blue, Self>
fn magenta<'a>(&'a self) -> FgColorDisplay<'a, Magenta, Self>
fn magenta<'a>(&'a self) -> FgColorDisplay<'a, Magenta, Self>
fn on_magenta<'a>(&'a self) -> BgColorDisplay<'a, Magenta, Self>
fn on_magenta<'a>(&'a self) -> BgColorDisplay<'a, Magenta, Self>
fn purple<'a>(&'a self) -> FgColorDisplay<'a, Magenta, Self>
fn purple<'a>(&'a self) -> FgColorDisplay<'a, Magenta, Self>
fn on_purple<'a>(&'a self) -> BgColorDisplay<'a, Magenta, Self>
fn on_purple<'a>(&'a self) -> BgColorDisplay<'a, Magenta, Self>
fn cyan<'a>(&'a self) -> FgColorDisplay<'a, Cyan, Self>
fn cyan<'a>(&'a self) -> FgColorDisplay<'a, Cyan, Self>
fn on_cyan<'a>(&'a self) -> BgColorDisplay<'a, Cyan, Self>
fn on_cyan<'a>(&'a self) -> BgColorDisplay<'a, Cyan, Self>
fn white<'a>(&'a self) -> FgColorDisplay<'a, White, Self>
fn white<'a>(&'a self) -> FgColorDisplay<'a, White, Self>
fn on_white<'a>(&'a self) -> BgColorDisplay<'a, White, Self>
fn on_white<'a>(&'a self) -> BgColorDisplay<'a, White, Self>
fn default_color<'a>(&'a self) -> FgColorDisplay<'a, Default, Self>
fn default_color<'a>(&'a self) -> FgColorDisplay<'a, Default, Self>
fn on_default_color<'a>(&'a self) -> BgColorDisplay<'a, Default, Self>
fn on_default_color<'a>(&'a self) -> BgColorDisplay<'a, Default, Self>
fn bright_black<'a>(&'a self) -> FgColorDisplay<'a, BrightBlack, Self>
fn bright_black<'a>(&'a self) -> FgColorDisplay<'a, BrightBlack, Self>
fn on_bright_black<'a>(&'a self) -> BgColorDisplay<'a, BrightBlack, Self>
fn on_bright_black<'a>(&'a self) -> BgColorDisplay<'a, BrightBlack, Self>
fn bright_red<'a>(&'a self) -> FgColorDisplay<'a, BrightRed, Self>
fn bright_red<'a>(&'a self) -> FgColorDisplay<'a, BrightRed, Self>
fn on_bright_red<'a>(&'a self) -> BgColorDisplay<'a, BrightRed, Self>
fn on_bright_red<'a>(&'a self) -> BgColorDisplay<'a, BrightRed, Self>
fn bright_green<'a>(&'a self) -> FgColorDisplay<'a, BrightGreen, Self>
fn bright_green<'a>(&'a self) -> FgColorDisplay<'a, BrightGreen, Self>
fn on_bright_green<'a>(&'a self) -> BgColorDisplay<'a, BrightGreen, Self>
fn on_bright_green<'a>(&'a self) -> BgColorDisplay<'a, BrightGreen, Self>
fn bright_yellow<'a>(&'a self) -> FgColorDisplay<'a, BrightYellow, Self>
fn bright_yellow<'a>(&'a self) -> FgColorDisplay<'a, BrightYellow, Self>
fn on_bright_yellow<'a>(&'a self) -> BgColorDisplay<'a, BrightYellow, Self>
fn on_bright_yellow<'a>(&'a self) -> BgColorDisplay<'a, BrightYellow, Self>
fn bright_blue<'a>(&'a self) -> FgColorDisplay<'a, BrightBlue, Self>
fn bright_blue<'a>(&'a self) -> FgColorDisplay<'a, BrightBlue, Self>
fn on_bright_blue<'a>(&'a self) -> BgColorDisplay<'a, BrightBlue, Self>
fn on_bright_blue<'a>(&'a self) -> BgColorDisplay<'a, BrightBlue, Self>
fn bright_magenta<'a>(&'a self) -> FgColorDisplay<'a, BrightMagenta, Self>
fn bright_magenta<'a>(&'a self) -> FgColorDisplay<'a, BrightMagenta, Self>
fn on_bright_magenta<'a>(&'a self) -> BgColorDisplay<'a, BrightMagenta, Self>
fn on_bright_magenta<'a>(&'a self) -> BgColorDisplay<'a, BrightMagenta, Self>
fn bright_purple<'a>(&'a self) -> FgColorDisplay<'a, BrightMagenta, Self>
fn bright_purple<'a>(&'a self) -> FgColorDisplay<'a, BrightMagenta, Self>
fn on_bright_purple<'a>(&'a self) -> BgColorDisplay<'a, BrightMagenta, Self>
fn on_bright_purple<'a>(&'a self) -> BgColorDisplay<'a, BrightMagenta, Self>
fn bright_cyan<'a>(&'a self) -> FgColorDisplay<'a, BrightCyan, Self>
fn bright_cyan<'a>(&'a self) -> FgColorDisplay<'a, BrightCyan, Self>
fn on_bright_cyan<'a>(&'a self) -> BgColorDisplay<'a, BrightCyan, Self>
fn on_bright_cyan<'a>(&'a self) -> BgColorDisplay<'a, BrightCyan, Self>
fn bright_white<'a>(&'a self) -> FgColorDisplay<'a, BrightWhite, Self>
fn bright_white<'a>(&'a self) -> FgColorDisplay<'a, BrightWhite, Self>
fn on_bright_white<'a>(&'a self) -> BgColorDisplay<'a, BrightWhite, Self>
fn on_bright_white<'a>(&'a self) -> BgColorDisplay<'a, BrightWhite, Self>
fn bold<'a>(&'a self) -> BoldDisplay<'a, Self>
fn bold<'a>(&'a self) -> BoldDisplay<'a, Self>
fn dimmed<'a>(&'a self) -> DimDisplay<'a, Self>
fn dimmed<'a>(&'a self) -> DimDisplay<'a, Self>
fn italic<'a>(&'a self) -> ItalicDisplay<'a, Self>
fn italic<'a>(&'a self) -> ItalicDisplay<'a, Self>
fn underline<'a>(&'a self) -> UnderlineDisplay<'a, Self>
fn underline<'a>(&'a self) -> UnderlineDisplay<'a, Self>
fn blink<'a>(&'a self) -> BlinkDisplay<'a, Self>
fn blink<'a>(&'a self) -> BlinkDisplay<'a, Self>
fn blink_fast<'a>(&'a self) -> BlinkFastDisplay<'a, Self>
fn blink_fast<'a>(&'a self) -> BlinkFastDisplay<'a, Self>
fn reversed<'a>(&'a self) -> ReversedDisplay<'a, Self>
fn reversed<'a>(&'a self) -> ReversedDisplay<'a, Self>
fn strikethrough<'a>(&'a self) -> StrikeThroughDisplay<'a, Self>
fn strikethrough<'a>(&'a self) -> StrikeThroughDisplay<'a, Self>
fn color<Color>(&self, color: Color) -> FgDynColorDisplay<'_, Color, Self>where
Color: DynColor,
fn color<Color>(&self, color: Color) -> FgDynColorDisplay<'_, Color, Self>where
Color: DynColor,
OwoColorize::fg or
a color-specific method, such as OwoColorize::green, Read morefn on_color<Color>(&self, color: Color) -> BgDynColorDisplay<'_, Color, Self>where
Color: DynColor,
fn on_color<Color>(&self, color: Color) -> BgDynColorDisplay<'_, Color, Self>where
Color: DynColor,
OwoColorize::bg or
a color-specific method, such as OwoColorize::on_yellow, Read more