Tell a redo from a coincidence

main

Commit

peyton-alt1w ago

The redo rule matched too loosely and missed real redos:

  • Commits still on a branch or remote were "dropped": merging main and then reset --soft main inherited main's history, and undoing a rebase inherited the teammate commit it had brought in. Dropped now means only the reset's old tip reaches it.
  • One byte-identical file (a lockfile, an empty init.py, the same deletion) among rewritten ones inherited a discarded attempt. Every staged file a dropped commit changed must now match.
  • Ordinary commits never closed the window. Commits since the reset now keep it open only while each redid dropped work.
  • Unstaging or a stash after reset --soft overwrote ORIG_HEAD and lost the redo, and an amend fold never looked. The reset is read from HEAD's reflog, skipping resets that did not move HEAD, and amends inherit too.

Co-Authored-By: Claude Opus 5.5 (1M context) noreply@anthropic.com Entire-Checkpoint: 01M39ZYYM28464BY80H6GFNJ3E

Checkpoints

Track Subagent Work Across Worktrees

Claude CodeOpus 5.5
View session
Checkpoint 1