Expand description
Workspace byte-size estimation before side-git snapshot init.
A full git add -A on multi-GB trees (node_modules, model weights, etc.)
can block for minutes. We walk the workspace with the same ripgrep-style
skip rules as search tools and bail out before touching git when the
on-disk footprint exceeds [snapshots] max_workspace_gb.
Constants§
- DEFAULT_
SNAPSHOT_ MAX_ WORKSPACE_ GB - Default cap when
[snapshots] max_workspace_gbis unset (matches upstream v0.8.32).
Functions§
- estimate_
workspace_ bytes - Sum file sizes under
workspace, honoring gitignore + skip-dir rules. Stops early oncelimit_byteswould be exceeded (passNonefor full scan). - workspace_
exceeds_ size_ limit - Returns
truewhen the workspace tree exceedsmax_gb( gibibyte-style GB:max_gb * 1024^3bytes).