You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
CLI: a script-safe way to get a workspace's changes out #41
Found while dogfooding sandfs in a cloud container (fix for #31 made entirely inside a FUSE-mounted fork, PR #40).
Getting the changes out took a hand-written loop. After working in a fork, the files had to be copied to a real folder. The only way was to parse sandfs changes output:
sandfs changes work |whileread k p;docase$kin A|M) mkdir -p "$(dirname "$p")"; cp "$W/$p""$p";; D) rm -f "$p";; esac;done
That breaks on names with leading spaces or newlines, since sandfs changes prints one K path line per file with no quoting. Two small options, either enough:
sandfs changes NAME --copy-to DIR: copy added and modified files into DIR and remove deleted ones. This writes only where the user explicitly points it, never back into a source implicitly.
Tool caches show up as changes. Running a build inside the fork wrote 288 cache files, which buried the 2 real changes in sandfs changes. Pointing the cache outside the mount (an env var) fixed it. Any program that writes temp or cache files next to its inputs will do the same. A path argument (sandfs changes NAME [PATH], like the MCP tool's path) would let a caller look at one subtree; anything more is probably the harness's job.
Not touching the CLI now since the performance work is changing it.
Activity
Copy a workspace's changes into a folder with changes --copy-to
Copy a workspace's changes into a folder with changes --copy-to
Copy a workspace's changes into a folder with changes --copy-to
Copy a workspace's changes into a folder with changes --copy-to (#116)