pub fn sync(start: &Path, strategy: SyncStrategy) -> Result<SyncReport>Expand description
Fetch start’s upstream, then rebase (or merge) the local branch
onto it. start may be any path inside the target worktree — the
repository is discovered upwards from it.
Refuses up front when:
- the working tree is dirty (uncommitted changes),
- HEAD is detached / unborn (no branch shorthand),
- the branch has no upstream configured.
On a conflicting rebase/merge the operation is aborted so the worktree is left usable, and a conflict error is returned telling the user to reconcile by hand.