Documentation
¶
Index ¶
- func CaptureBaseline(ctx context.Context, r Runner, root string) (string, error)
- func CommonDir(ctx context.Context, r Runner, root string) (string, error)
- func CurrentBranch(ctx context.Context, r Runner, root string) (string, error)
- func Fingerprint(ctx context.Context, r Runner, root, projectID string) (string, error)
- func Hash(entries []Entry) (string, error)
- type Change
- type Entry
- type Ignores
- type Manifest
- type Runner
- type States
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CaptureBaseline ¶
func CurrentBranch ¶
CurrentBranch reports the checked-out branch name for a worktree. A detached HEAD has no branch, which is reported as an empty name rather than an error so session observation keeps working. The name is bounded and validated because it becomes shared coordination metadata.
func Fingerprint ¶
Types ¶
type Ignores ¶
type Ignores struct {
// contains filtered or unexported fields
}
Ignores answers whether Git ignores a path under one repository root, so the file watcher can prune ignored trees instead of watching them. On macOS the watcher's kqueue backend pins an open file descriptor for every watched directory and every file inside one for the life of the watch, so watching ignored build trees (node_modules and friends) exhausts the system file table. Pruning is therefore a resource-correctness requirement, not an optimization.
The bulk of the answer is captured once from ls-files at construction. Paths that appear after that snapshot — a fresh node_modules materializing during an install — are resolved with check-ignore on first sight and cached.
func NewIgnores ¶
NewIgnores snapshots the ignored paths of the repository at root. root must be absolute, as the watcher hands absolute paths back for matching.