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
worktree of the current repository, including its main working tree.
all: boolRebase every worktree of the current repository, including its 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.Source§impl Parser for RebaseCommand
impl Parser for RebaseCommand
Source§fn parse_from<I, T>(itr: I) -> Self
fn parse_from<I, T>(itr: I) -> Self
Source§fn try_parse_from<I, T>(itr: I) -> Result<Self, Error>
fn try_parse_from<I, T>(itr: I) -> Result<Self, Error>
Source§fn update_from<I, T>(&mut self, itr: I)
fn update_from<I, T>(&mut self, itr: I)
Auto Trait Implementations§
impl Freeze for RebaseCommand
impl RefUnwindSafe for RebaseCommand
impl Send for RebaseCommand
impl Sync for RebaseCommand
impl Unpin for RebaseCommand
impl UnsafeUnpin for RebaseCommand
impl UnwindSafe for RebaseCommand
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
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> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more