Repository navigation
Let the newer /rewind backup take its name in a copy, and say what happened - #23
Merged
Merged
Conversation
…at happened A copy left every differing file in the target alone, including /rewind backups, and reported only "1 conflicts left alone" with a path. For backups that is the wrong default: Claude Code numbers a file's backups per process and writes @v1, @v2 again after a resume, replacing its own older backups, so the same name with other content is expected, and the transcript's newest references to that name mean the newest backup. In 1087b979, default kept a September @V3 while the October references point at talcum's. For files under file-history/<id>/, the newer of the two (by modification time) now takes the name, as Claude Code would do; the older target backup is moved to archive/<time>/<target account>/ first, and a target backup that is as new or newer is still left alone. Other differing files are left alone as before, and without an archive folder nothing is replaced. resume -a's sync now gets the archive folder too. copy and the resume sync say what they replaced and where the older backup went, and why each file left alone was left alone. README, tutorial and DESIGN.md explain the clash and its one effect: /rewind's restore of code at an older checkpoint, which Claude Code already gets wrong after a resume.
A /rewind backup a copy created got the time of the copy, so a later copy could take an old backup for the newer one and replace a backup Claude Code wrote since. Copied backups now keep their source's modification time. The swap records a replaced backup before setting its time, puts the older backup back only if nothing took its place, and does not let two copies in the same second overwrite each other's set-aside file.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
A copy left every differing file in the target alone, including
/rewindbackups (file-history/<id>/<hash>@vN), and only printed "1 conflicts left alone". Claude Code numbers a file's backups per process and reuses@v1,@v2… after a resume, replacing its own older backups, so the same name with other content is expected, and the transcript's newest references to that name mean the newest backup./rewindbackups, the newer of the two (modification time) takes the name, as Claude Code would do; the older target backup moves toarchive/<time>/<target account>/first. A target backup that is as new or newer is left alone. Other differing files are left alone as before; without an archive folder nothing is replaced.resume -a's sync now gets the archive folder too.copyand the resume sync say what they replaced, where the older backup went, and why each file left alone was left alone./rewind's restore of code at an older checkpoint, which Claude Code already gets wrong after a resume.Test plan
go vet ./...,gofmt -l .,go test ./...