Enum git_branchless_opts::Command
source · pub enum Command {
Show 25 variants
Amend {
move_options: MoveOptions,
reparent: bool,
},
BugReport,
Difftool(Opts),
Gc,
Hide {
revsets: Vec<Revset>,
resolve_revset_options: ResolveRevsetOptions,
delete_branches: bool,
recursive: bool,
},
Hook(HookArgs),
Init(InitArgs),
InstallManPages(InstallManPagesArgs),
Move {
source: Vec<Revset>,
base: Vec<Revset>,
exact: Vec<Revset>,
dest: Option<Revset>,
resolve_revset_options: ResolveRevsetOptions,
move_options: MoveOptions,
fixup: bool,
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: MoveOptionsOptions for moving commits.
Amend the current HEAD commit.
BugReport
Gather information about recent operations to upload as part of a bug report.
Difftool(Opts)
Use the partial commit selector UI as a Git-compatible difftool; see git-difftool(1) for more information on Git difftools.
Gc
Run internal garbage collection.
Hide
Fields
resolve_revset_options: ResolveRevsetOptionsOptions for resolving revset expressions.
Hide the provided commits from the smartlog.
Hook(HookArgs)
Internal use.
Init(InitArgs)
Initialize the branchless workflow for this repository.
InstallManPages(InstallManPagesArgs)
Install git-branchless’s man-pages to the given path.
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.
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(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: ResolveRevsetOptionsOptions for resolving revset expressions.
move_options: MoveOptionsOptions 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: 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.
Reword commits.
Smartlog(SmartlogArgs)
smartlog command.
Snapshot
Fields
subcommand: SnapshotSubcommandThe subcommand to run.
Manage working copy snapshots.
Submit(SubmitArgs)
Push commits to a remote.
Switch
Fields
switch_options: SwitchOptionsOptions for switching.
Switch to the provided branch or commit.
Sync
Fields
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(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: ResolveRevsetOptionsOptions for resolving revset expressions.
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§
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
§fn try_parse() -> Result<Self, Error<RichFormatter>>
fn try_parse() -> Result<Self, Error<RichFormatter>>
std::env::args_os(), return Err on error.§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,
§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,
§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,
§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> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere T: Any,
§fn into_any(self: Box<T, Global>) -> Box<dyn Any, Global>
fn into_any(self: Box<T, Global>) -> Box<dyn Any, Global>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.§fn into_any_rc(self: Rc<T, Global>) -> Rc<dyn Any, Global>
fn into_any_rc(self: Rc<T, Global>) -> Rc<dyn Any, Global>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.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