pub struct RebaseOptions {
pub onto: Option<String>,
pub autostash: bool,
pub dry_run: bool,
pub keep_conflicts: bool,
pub git_bin: Option<PathBuf>,
}Expand description
Knobs for a batch rebase.
Fields§
§onto: Option<String>Override the rebase target ref (default: the repository’s remote default
branch, e.g. origin/main). A <remote>/<branch> value is still fetched
once up front; a local ref or raw commit is used as-is (no fetch).
autostash: boolStash uncommitted changes before each rebase and restore them after, rather than skipping a dirty worktree.
dry_run: boolFetch and classify, but perform no rebase.
keep_conflicts: boolLeave a conflicting worktree mid-rebase instead of git rebase --abort-ing it (#1415).
The default (abort) keeps the worktree exactly as it was, which is the
right conservative choice for a batch the user is watching scroll past. But
it also throws away every conflict already resolved by git rerere and
every hunk git applied cleanly before the collision — work the user then has
to reproduce by hand. With this set, the worktree stays in its conflicted
state so the conflict can be resolved in place and finished with
git rebase --continue, and the batch moves on to the next worktree
regardless.
git_bin: Option<PathBuf>The git executable to shell out to. None resolves it via
resolve_git_binary, which is what a caller with a minimal PATH (the
daemon) needs; the field exists so a caller can resolve once and reuse,
and so a test can point the engine at a stub.
Trait Implementations§
Source§impl Clone for RebaseOptions
impl Clone for RebaseOptions
Source§fn clone(&self) -> RebaseOptions
fn clone(&self) -> RebaseOptions
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for RebaseOptions
impl Debug for RebaseOptions
Source§impl Default for RebaseOptions
impl Default for RebaseOptions
Source§fn default() -> RebaseOptions
fn default() -> RebaseOptions
Auto Trait Implementations§
impl Freeze for RebaseOptions
impl RefUnwindSafe for RebaseOptions
impl Send for RebaseOptions
impl Sync for RebaseOptions
impl Unpin for RebaseOptions
impl UnsafeUnpin for RebaseOptions
impl UnwindSafe for RebaseOptions
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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