Repository navigation
One fork command for task copies, from a clone or a mount - #154
Merged
Merged
Conversation
`sandfs fork FROM DIR` now takes a folder of a git repository on this machine as FROM, making a workspace of its HEAD plus the files its folder has changed since, and any folder inside a mount, which forks that workspace. `--branch NAME` starts git in the fork on a new branch at FROM's commit, keeping its files and index, and `--read-only PATH` adds read-only paths. A plain folder outside any repository is refused for now. `mount --uncommitted` and `mount --branch` are removed: `mount` is the live view again, and `fork` is the one way to make a task copy. The README gains a git-to-sandfs table. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01XW4S6E1zKKGLEikvwvoMrz
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. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 3919ea82fc
ℹ️ 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_01XW4S6E1zKKGLEikvwvoMrz
This was referenced Oct 26, 2026
Merged
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.
Requested by George · project thread
Making a throwaway copy for one task took a different command depending on where you started:
sandfs forkin a folder sandfs mounts,sandfs mount git:. DIR --uncommitted --branch xin a clone (#152). Nowforkdoes both, and the mount flags are gone, somountis the live view again andforkis the one way to make a copy:Changes (CLI only, no core API change)
fork FROMnow accepts, besides a workspace name or its mount directory:sandfs fork .works from a subfolder);git:workspace atHEADplus the folder's uncommitted, new and deleted files, through Task copies of a local repository: mount --branch, --uncommitted, rm --unmount #152'sgit::start(now always copying those files);mount. The task-copies thread will fill that case with a frozen copy (APFS clone / reflink).fork --branch NAME: for a workspace fork, the newgit::switch_newwrites.git/HEADand the branch at the commit FROM is on (resolving loose refs andpacked-refs), keeping files and the index, likegit switch -c. It refuses names the repository (or its remote, for partial clones) or FROM already has. Saved times are carried over, so the fork's files keep their modification times.fork --read-only PATH: adds read-only paths to those FROM has (needed now that the clone case goes throughfork).mount --uncommittedandmount --branch(no users yet, so no compatibility shim).fork, plus a short git-to-sandfs table (clone, worktree add/list/remove). sandfs-cli README and changelog updated.Testing
fork: started from a subfolder of the clone, with--branchand--read-only, every kind of uncommitted change, frozen start, push back; a second fork made from a subfolder of the first mount keeps its commit and staged file on a new branch; refusals for existing branches (repository, fork, remote, partial clone), bad names, a folder source, a plain folder and an existing name, with nothing left behind.sandfs fork . DIR --branch xtook 0.14 s, and a fork fromsrc/vsinside that mount 0.17 s.cargo clippy --workspace --all-targets -D warningsandcargo fmt --checkare clean.cargo test -p sandfs-clipasses on Linux FUSE except the twosandfs shelltests, which need bubblewrap, missing in this container; CI covers them.Conflicts with #153 (safe
changes --copy-to) are expected in the Fork arm and the end ofgit::start; whichever lands second keeps both.Generated by Claude Code