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 more