Repository navigation
Copy a workspace's changes into a folder with changes --copy-to - #116
Conversation
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
Security findingsAdvisory findings (2)
ℹ️ 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: 815974e6b0
ℹ️ 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".
a61742f to
5eef898
Compare
There was a problem hiding this comment.
🛡️ Codex Security Review · Automatically triggered
Here are some automated security review suggestions for this pull request.
Reviewed commit: 5eef89847f
ℹ️ About Codex security reviews in GitHub
This is an experimental Codex feature. Security reviews are triggered when:
- You comment "@codex security review"
- A regular code review gets triggered (for example, "@codex review" or when a PR is opened), and you’re opted in so security review runs alongside code review
Once complete, Codex will leave suggestions, or a comment if no findings are found.
There was a problem hiding this comment.
🛡️ Codex Security Review · Automatically triggered
Here are some automated security review suggestions for this pull request.
Reviewed commit: 1165d1f70f
ℹ️ About Codex security reviews in GitHub
This is an experimental Codex feature. Security reviews are triggered when:
- You comment "@codex security review"
- A regular code review gets triggered (for example, "@codex review" or when a PR is opened), and you’re opted in so security review runs alongside code review
Once complete, Codex will leave suggestions, or a comment if no findings are found.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 1165d1f70f
ℹ️ 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: 4ad6ddb643
ℹ️ 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: 326531af8f
ℹ️ 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".
`sandfs changes NAME [PATH...] --copy-to DIR` writes the changes listed into DIR: added and modified files and links with their executable bit, deleted ones removed, deletions first so a file can replace a folder. Every file and link is made in a staging folder inside DIR before DIR changes, so a copy retried after a mount's save replaced what it read leaves nothing behind. Nothing is written through a link found in DIR, and nothing into a folder any Mac or Windows disk would read as .git. PATH arguments limit the listing to some files or folders. Replaces the hand loop over `changes` (#41). Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01LCMApy2YCT332kuwV3wdNn
326531a to
6cf86b9
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 6cf86b98e4
ℹ️ 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_01LCMApy2YCT332kuwV3wdNn
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 5f3bb0dba0
ℹ️ 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".
| let git_dir = git_dir.transpose()?; | ||
| let listed: Vec<_> = changes | ||
| .iter() | ||
| .filter(|change| !git_dir.as_ref().is_some_and(|dir| change.path.starts_with(dir))) |
There was a problem hiding this comment.
Count git-mount changes omitted before copying
When a git-backed workspace has changes under /mnt/.git—for example, an in-mount commit updates its index or refs—this filter removes them before copy::copy_to can include them in held_back. Consequently changes --copy-to succeeds without the promised warning or count even though it omitted changes; count these filtered entries when copying, rather than silently discarding them first.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Leaving this as is. In a git: mount, .git is sandfs's own view of the repository and isn't part of the files, so changes never lists it and --copy-to copies only what's listed. The count is for .git folders that do appear among the listed files, in a host folder that has one.
Generated by Claude Code
Requested by George · project thread
Closes #41. Second of the small changes for "an agent whose only files are a sandfs workspace": once its work is reviewed, the keep step is one command.
Before. The only way to get changes out was a shell loop over
sandfs changesoutput, which broke on unusual names.After.
sandfs changes NAME [PATH...] --copy-to DIR. It writes the listed changes into DIR:PATHarguments limitchangesto some files or folders, with or without--copy-to. The idea comes from CLI: a script-safe way to get a workspace's changes out #41's note about tool caches..gitstays out, as in the listing.API. No core or Python changes. This adds the new
crates/sandfs-cli/src/copy.rsand wires it into theChangescommand inmain.rs.Docs. Root README, sandfs-cli README and changelog.
Tests. All pass locally, with the mount test running under FUSE (
SANDFS_REQUIRE_FUSE=1).cargo test -p sandfs-cli copy_toruns three tests:cli.rs: copying only the paths asked for, then everything.cli.rs: refusing to write through a link in DIR.mount.rs: links, the executable bit, and a file replacing a folder, all through a real mount.Generated by Claude Code