Enum git_branchless_opts::Command
source · pub enum Command {
Show 23 variants
Amend {
move_options: MoveOptions,
reparent: bool,
},
BugReport,
Gc,
Hide {
revsets: Vec<Revset>,
resolve_revset_options: ResolveRevsetOptions,
delete_branches: bool,
recursive: bool,
},
Hook(HookArgs),
Init(InitArgs),
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(QueryArgs),
Repair {
dry_run: bool,
},
Restack {
revsets: Vec<Revset>,
resolve_revset_options: ResolveRevsetOptions,
move_options: MoveOptions,
},
Record(RecordArgs),
Reword {
revsets: Vec<Revset>,
resolve_revset_options: ResolveRevsetOptions,
force_rewrite_public_commits: bool,
messages: Vec<String>,
discard: bool,
commit_to_fixup: Option<Revset>,
},
Smartlog(SmartlogArgs),
Snapshot {
subcommand: SnapshotSubcommand,
},
Submit(SubmitArgs),
Switch {
switch_options: SwitchOptions,
},
Sync {
pull: bool,
move_options: MoveOptions,
revsets: Vec<Revset>,
resolve_revset_options: ResolveRevsetOptions,
},
Test(TestArgs),
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: MoveOptions
Options 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: ResolveRevsetOptions
Options for resolving revset expressions.
Hide the provided commits from the smartlog.
Hook(HookArgs)
Internal use.
Init(InitArgs)
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: ResolveRevsetOptions
Options for resolving revset expressions.
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.
Query(QueryArgs)
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
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: ResolveRevsetOptions
Options for resolving revset expressions.
move_options: MoveOptions
Options for moving commits.
Fix up commits abandoned by a previous rewrite operation.
Record(RecordArgs)
Create a commit by interactively selecting which changes to include.
Reword
Fields
resolve_revset_options: ResolveRevsetOptions
Options for resolving revset expressions.
force_rewrite_public_commits: bool
Force 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
.
Reword commits.
Smartlog(SmartlogArgs)
smartlog
command.
Snapshot
Fields
subcommand: SnapshotSubcommand
The subcommand to run.
Manage working copy snapshots.
Submit(SubmitArgs)
Push commits to a remote.
Switch
Fields
switch_options: SwitchOptions
Options for switching.
Switch to the provided branch or commit.
Sync
Fields
move_options: MoveOptions
Options 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: ResolveRevsetOptions
Options for resolving revset expressions.
Move any local commit stacks on top of the main branch.
Test(TestArgs)
Run a command on each commit in a given set and aggregate the results.
Undo
Fields
Browse or return to a previous state of the repository.
Unhide
Fields
resolve_revset_options: ResolveRevsetOptions
Options for resolving revset expressions.
Unhide previously-hidden commits from the smartlog.
Wrap
Fields
command: WrappedCommand
The arguments to pass to git
.
Wrap a Git command inside a branchless transaction.
Trait Implementations§
source§impl CommandFactory for Command
impl CommandFactory for Command
source§impl FromArgMatches for Command
impl FromArgMatches for Command
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 Parser for Command
impl Parser for Command
source§fn try_parse() -> Result<Self, Error<RichFormatter>>
fn try_parse() -> Result<Self, Error<RichFormatter>>
std::env::args_os()
, return Err on error.source§fn 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,
source§fn 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,
source§fn 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,
source§fn 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,
source§impl Subcommand for Command
impl Subcommand for Command
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
source§fn 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§
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn 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 on_yellow<'a>(&'a self) -> BgColorDisplay<'a, Yellow, Self>
fn on_yellow<'a>(&'a self) -> BgColorDisplay<'a, Yellow, 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 on_purple<'a>(&'a self) -> BgColorDisplay<'a, Magenta, Self>
fn on_purple<'a>(&'a self) -> BgColorDisplay<'a, Magenta, 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 blink_fast<'a>(&'a self) -> BlinkFastDisplay<'a, Self>
fn blink_fast<'a>(&'a self) -> BlinkFastDisplay<'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 more§fn 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