Skip to main content

Module paths

Module paths 

Source
Expand description

Path resolution for the per-workspace snapshot side-repos.

Snapshots live in ~/.zagens/snapshots/<project_hash>/<worktree_hash>/. The two-level hash split lets us snapshot multiple worktrees of the same project independently — git worktree list users won’t get cross-talk between feature branches.

Functions§

ensure_snapshot_dir
Ensure the snapshot dir exists on disk and return its path.
snapshot_dir_for
Compute the snapshot directory for a given workspace path.
snapshot_dir_with_home
Same as snapshot_dir_for but with an injectable home directory. Used by tests so we never touch the user’s real ~/.zagens/.
snapshot_git_dir
Resolve the .git directory inside the snapshot dir.