Handoff notes for future work
Project intent
terrisis a git worktree manager CLI built in Rust.- Operates from any directory inside a git repo; resolves the repo root via
git. - Uses the
git worktreesubcommands directly; no custom git plumbing.
Command summary
terris <branch>terristerris --allterris --rm <branch>
Key implementation details
- Parsing uses
git worktree list --porcelainto avoid brittle parsing. - Branch detection:
refs/heads/<name>is checked viagit rev-parse --verify --quiet. - Ensure behavior: if branch exists,
git worktree add <path> <branch>; otherwisegit worktree add -b <branch> <path>from current HEAD. - Default path is computed from registry:
~/.terris-worktrees/<repo-name>/<branch>-<8-random-lowercase-letters>. - Worktree matching is by branch short-name only.
- Errors are surfaced with
anyhowand clear messages.
Build/run
- Build:
cargo build - Run:
cargo run -- <subcommand> - After every code update, run
cargo check,cargo clippy, andcargo test, and fix all errors found there.