pub struct RebaseCommand {
pub paths: Vec<PathBuf>,
pub all: bool,
pub onto: Option<String>,
pub autostash: bool,
pub dry_run: bool,
pub keep_conflicts: bool,
pub yes: bool,
pub output: TableOrJson,
}Expand description
Rebases worktrees onto the repository’s remote default branch, fetching that branch exactly once per repository (#1400).
Unlike every other worktrees subcommand this runs entirely locally and
never talks to the daemon — by choice, not by necessity (ADR-0059). The
daemon hosts the same engine behind its two-phase rebase op, which is what
the tree view’s “Rebase on main” drives; keeping this command local is what
makes a batch rebase work with no daemon running at all, and keeps
--onto/--all (CLI-only concerns) out of the wire protocol. The git work
lives in crate::git::worktree_rebase; see ADR-0059, ADR-0055, ADR-0003.
A rebase rewrites branch history, so it confirms by default (--dry-run to
preview, -y to skip the prompt) in the spirit of ADR-0027.
Fields§
§paths: Vec<PathBuf>Worktree folders to rebase. Omit these and pass --all to rebase every
linked worktree of the current repository.
all: boolRebase every linked worktree of the current repository (never the main working tree).
onto: Option<String>Rebase onto this ref instead of the remote default branch. A
<remote>/<branch> value is still fetched once up front.
autostash: boolStash uncommitted changes around each rebase instead of skipping the worktree.
dry_run: boolFetch and report what would be rebased, but rebase nothing.
keep_conflicts: boolLeave a conflicting worktree mid-rebase to resolve in place, instead of aborting it back to its previous state.
yes: boolSkip the interactive confirmation before rebasing.
output: TableOrJsonOutput format.
Implementations§
Trait Implementations§
Source§impl Args for RebaseCommand
impl Args for RebaseCommand
Source§fn augment_args<'b>(__clap_app: Command) -> Command
fn augment_args<'b>(__clap_app: Command) -> Command
Source§fn augment_args_for_update<'b>(__clap_app: Command) -> Command
fn augment_args_for_update<'b>(__clap_app: Command) -> Command
Command so it can instantiate self via
FromArgMatches::update_from_arg_matches_mut Read moreSource§impl CommandFactory for RebaseCommand
impl CommandFactory for RebaseCommand
Source§impl FromArgMatches for RebaseCommand
impl FromArgMatches for RebaseCommand
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(
&mut self,
__clap_arg_matches: &mut ArgMatches,
) -> Result<(), Error>
fn update_from_arg_matches_mut( &mut self, __clap_arg_matches: &mut ArgMatches, ) -> Result<(), Error>
ArgMatches to self.