Repository navigation
refactor(workspace): hand the snapshot's index to the command - #100
Merged
Merged
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 59 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
PiquelChips
force-pushed
the
feat/workspaces-index
branch
3 times, most recently
from
November 23, 2026 12:30
c1c3e53 to
6076ac7
Compare
PiquelChips
force-pushed
the
feat/workspaces-index
branch
from
November 23, 2026 12:58
6076ac7 to
98c29a9
Compare
Every command that reads the working copy opened the record index again after its snapshot, and saving a revision opened it once more, through the annotations, to check whether the change diverged. The snapshot now reads the index once and hands it to the command, in `WorkingCopy`. Saving adds the records it wrote with `Index::add`, so the index knows the new revision as one read afterwards would, without reading it again. Divergence is checked against that index, and the annotations are only opened when the change did diverge.
PiquelChips
force-pushed
the
feat/workspaces-index
branch
from
November 23, 2026 18:03
98c29a9 to
56ee96c
Compare
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.
Every command that reads the working copy opened the record index again after its snapshot, and saving a revision opened it once more, through the annotations, to check whether the change diverged.
The snapshot now reads the index once and hands it to the command in
WorkingCopy. Saving adds the records it just wrote withIndex::add, so the index knows the new revision as one read afterwards would, without reading it again. Divergence is checked against that index, and the annotations are only opened when the change did diverge.This is groundwork for workspaces: later in the stack, the snapshot also uses this index to tell whether the working copy's change moved on without it.
Note
Written by Claude Opus 5.5 in Claude Code (via T3 Code)