Skip to content

ResolvedBase

Defined in: src/worktree.ts:19

ahead: number

Defined in: src/worktree.ts:27


baseRef: string

Defined in: src/worktree.ts:25

The ref or sha to pass to worktree.create() as the base commit. For a non-diverged branch with an upstream, this is the upstream sha (so the new task always starts fresh even when the local fast-forward was skipped due to a dirty tree or a worktree checkout elsewhere). For diverged / no-upstream branches it falls back to the branch name.


behind: number

Defined in: src/worktree.ts:26


diverged: boolean

Defined in: src/worktree.ts:28


hasUpstream: boolean

Defined in: src/worktree.ts:29


localExists: boolean

Defined in: src/worktree.ts:30


localFf: "none" | "applied" | "skipped-dirty" | "skipped-diverged" | "skipped-checked-out-elsewhere" | "not-needed"

Defined in: src/worktree.ts:39

What happened to the local branch during the fast-forward attempt:

  • “applied” — local branch was moved to the upstream sha
  • “skipped-dirty” — checked-out branch, working tree had changes
  • “skipped-diverged” — local branch has commits not on upstream
  • “skipped-checked-out-elsewhere” — branch is HEAD in another worktree
  • “not-needed” — local was already at the upstream sha
  • “none” — no upstream to freshen toward