Sweep 19 Sep 2026 · 02:36Z Build v2.1.278 500 read Stable v2.1.267 Latest v2.1.278 Next v2.1.278 Feeds RSS JSON llms.txt Unofficial
Claude Code v2.1.269 ·

Git checkout/branch operations now detect stale locks and layout changes

Git branch-update and checkout-apply operations now check for stale locks and re-verify the working tree's layout before writing, failing safely instead of corrupting state

TierUnder the hoodhow much it should matter to you
Useful1my rating, 1 to 5
Signal1worth watching, 1 to 5
AreaGit Internalswhat it touches
KindImprovementsin v2.1.269,
Group of 4 Under the hood

Git branch-update and checkout-apply operations now check for stale locks and re-verify the working tree's layout before writing, failing safely instead of corrupting state

What

  • The internal fast-forward helper used to advance a branch now takes commonDir and layout parameters, checks the branch ref lock, HEAD lock, and their .pid.lock companion files for staleness, adds a timeout to the underlying git calls, and re-verifies the on-disk layout hasn't changed before writing the new ref.
  • The function that applies an incoming cloud-session commit to a local checkout now takes a layout parameter and, right before writing, re-checks that the checkout's git directory (its identity, HEAD, the session ref and reflog, packed-refs, and the shape of refs/ and objects/) hasn't changed since it was first read.
  • Git working-tree status and conflict-state enums gain two new values: ref_locked and layout_changed, used to abort these operations instead of writing on top of a moved or altered checkout.

Why This protects against corrupting a repository when something else (another process, a concurrent session) has changed the git directory or holds a stale lock during a fast-forward or cloud-session sync, failing safely with a clear reason instead of writing bad state.

See this entry in the whole of v2.1.269 →