How seruman/git-wt works
git-wt is a macOS command-line tool for creating, listing, locating, and removing Git worktrees, with optional APFS copy-on-write transfer of ignored local files. The main workflow runs from CLI parsing through command dispatch; creation resolves a branch and destination, adds a Git worktree, and optionally carries local files before reporting the path. The source excerpts are partial, so the graph omits uncertain internal call details while retaining README-documented capabilities.
Main entry points: lib.rs Command workflow · main.rs CLI entry · git.rs Git operations · clone.rs Clone planning
Components 11
CLI interface
- CLI entry
src/main.rs
Worktree lifecycle
- Command workflow
src/lib.rs
Local environment transfer
- Clone planning
src/clone.rs - Clone population
src/clone.rs - APFS clone primitive
src/native.rs
Git and naming
- Git operations
src/git.rs - Remote naming
src/naming.rs
Other components
- Shell user
- Git executable
- Local filesystem
- Command output
Connections 16
- Shell user → CLI entry: runs commands
- CLI entry → Command workflow: dispatches
- Command workflow → Git operations: queries and mutates
- Command workflow → Remote naming: resolves paths
- Command workflow → Clone planning: plans transfer
- Command workflow → Clone population: populates clone
- Command workflow → Local filesystem: reserves and cleans
- Git operations → Git executable: runs Git
- Remote naming → Git operations: reads remote config
- Clone planning → Git operations: lists files
- Clone planning → Local filesystem: walks source
- Clone population → APFS clone primitive: clones files
- Clone population → Local filesystem: creates entries
- APFS clone primitive → Local filesystem: APFS clonefile
- Command workflow → CLI entry: returns output
- CLI entry → Command output: writes result