Skip to main content

rebase_onto_start

Function rebase_onto_start 

Source
pub async fn rebase_onto_start(
    repo_path: PathBuf,
    new_base: String,
    old_base: String,
) -> Result<RebaseStepResult, GitError>
Expand description

Re-exported rebase/conflict APIs. Starts a rebase that moves commits after old_base onto new_base.

This is used for stacked sessions to drop commits that came from a parent branch after that parent has moved or squash-merged into its own base.

§Arguments

  • repo_path - Path to the git repository or worktree.
  • new_base - Ref that should become the new base of replayed commits.
  • old_base - Commit/ref whose ancestors should be left behind.

§Returns

A RebaseStepResult describing whether the rebase completed or encountered conflicts.

§Errors

Returns a GitError for non-conflict git failures.