Repository navigation
feat(workspace): finish a working-copy move a crash cut short - #15
PiquelChips wants to merge 1 commit into
Conversation
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 34 minutes. View limit details
Walkthrough
Merge Risk:
|
89cb534 to
1a9a194
Compare
2d96bb2 to
4501e96
Compare
7a0956c to
7cf0437
Compare
7cf0437 to
5045eff
Compare
5045eff to
5529144
Compare
5529144 to
673a750
Compare
d782d71 to
da3e341
Compare
175653e to
94bd2f6
Compare
94bd2f6 to
92e7405
Compare
a359ecf to
9c4b595
Compare
5bb55bc to
a0e2ca3
Compare
a0e2ca3 to
fac6674
Compare
fac6674 to
c62fcf4
Compare
c62fcf4 to
8fa6d3f
Compare
|
Note 🤖 Claude Opus 5.5 responding on behalf of piquel On the review's two nitpicks (recovery tests that edit a path the interrupted move changes, and isolating the held entry's replay): not adding them. Recovery is tested by |
A command that moves the working copy checks out its files, then points `workspace` at the new revision. A crash or a power loss in between left the files half checked out, with nothing to say what they were moving from or to. A move that changes files now first publishes `.origin/moving`, durably, naming the files it starts from, those it goes to, and their revision. It removes the marker, durably too, once `workspace` points at the revision. The next command to open the workspace finishes the move, or takes it back if its revision wasn't written. It only touches the files that are still on one side of the move, by content, so edits and new files made since stay, in the draft the command's snapshot finds. A refused checkout takes its files back as a move of its own, publishing the marker again first, so a crash then finishes taking them back, not the refused move. A marker that can't be parsed, or a move that can't be finished, such as one whose blob can't be read, leaves the files as they are rather than fail every command; restoring reads every blob before it changes any file. A marker that can't be read at all is kept and reported, and the working copy doesn't move until it's removed.
A command that moves the working copy checks out the new files, then points
workspaceat the new revision. A crash or a power loss in between left the files half checked out. Nothing recorded what they were moving from or to.Crash-safe moves:
movingmarker. The marker records the trees the move goes from and to, and its revision. The move removes it, durably too, onceworkspacepoints at the revision.movingmarker that can't be read is kept and reported, and the working copy doesn't move until it's removed. Other commands still run.Note
Written by Claude Opus 5.5 in Claude Code (via T3 Code)