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_forbut with an injectable home directory. Used by tests so we never touch the user’s real~/.zagens/. - snapshot_
git_ dir - Resolve the
.gitdirectory inside the snapshot dir.