pub async fn rebase_on_default(dir: &Path, default_branch: &str)Expand description
Rebase the current branch on the default branch.
Run before the agent starts to ensure the worktree has the latest code.
Fetches both the default branch and the current branch so agents never
need to run git fetch themselves (important for sandboxed agents like
codex whose workspace-write sandbox blocks writes outside the worktree).
Non-fatal: if rebase fails (conflicts), the agent may still be able to work.