Repository navigation
Add sandfs update: move a workspace onto a newer source - #156
Conversation
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
74590e3 to
d4ac798
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: d4ac79894c
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 2bd5a07981
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 89693f4d95
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 0a7aca7fcf
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
b7bc152 to
95ca2ac
Compare
`sandfs update NAME [SOURCE]` moves an unmounted workspace onto a newer version of its source: another folder, or another commit of its repository. Saved changes the newer source matches, or that a pull in the workspace brought in, are forgotten; paths changed on both sides are reported and keep the workspace's version. Branches and HEAD follow the new commit; ones at commits of the workspace's own are refused. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01CboUL9BU7nvDEZKfQBSkkq
95ca2ac to
8b2bdc7
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 8b2bdc7393
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01CboUL9BU7nvDEZKfQBSkkq
Requested by George · project thread
What changes
sandfs update NAME [SOURCE]moves an unmounted workspace onto a newer version of its source and keeps only the workspace's own changes.git:source or URL moves to the newest commit of its branch. SOURCE can be another commit of the same repository, or another folder.git pullin the mount checked out are forgotten too, even ones upstream changed again since. Only the commitHEADresolves to counts as pulled.C pathand keeps the workspace's version..git/indexis dropped and rebuilt.HEADand branches follow the new commit when they sit at the old commit or between the old and the new one. Packed branches follow too, except lines a loose ref has replaced.HEADat a commit made in the workspace is refused.HEADnaming a branch that would disappear is replaced by the new commit's own.This is the sandfs feature that Graft's
gft syncneeds.API changes
CLI only:
updatecommandupdatedfield inworkspace.jsonThe core is unchanged. New internal helpers:
Saved::links,Saved::forgetHome::set_record,Home::holds_copystore::open_basegit::changed_between,git::Movesandfs forkfrom a workspace now re-reads the source record after copying its changes, so it stays consistent with a concurrent update.Tests
cargo test -p sandfs-cli --test cli update: git (file://) and folder workspaces, conflicts, matches, relative sources, refusals.cargo test -p sandfs-cli --test mount update, run on FUSE:git pullin the mount, then updatea_fork_of_a_plain_folder_keeps_it_as_it_wasnow also updates the fork. It was run here on a btrfs loop mount, since ext4 can't clone.cargo test --workspace,clippy -D warningsandfmtpass locally on Linux.sandfs-bench'sa_process_tree_counts_its_running_childrenfailed once under the full parallel run and passes alone. That crate isn't touched here.🤖 Generated with Claude Code
https://claude.ai/code/session_01CboUL9BU7nvDEZKfQBSkkq