Skip to main content

Module worktree_ignore

Module worktree_ignore 

Source
Expand description

Ignore pattern helpers for worktree operations.

.heddleignore follows the same syntax as .gitignore: literal names, leading / for root-anchored rules, trailing / for directory-only matches, * and ** glob wildcards, character classes ([abc]), and ! negation (whitelist) rules. The matcher delegates to the ignore crate’s gitignore implementation so the semantics are spec-compliant; only the patterns themselves are sourced from .heddleignore instead of .gitignore.

Three “root-admin” pattern names — .heddle, .heddleignore, and .git — get an implicit leading / so they match only at the repo root. This preserves the long-standing invariant that a nested .heddle/ directory (e.g. an examples/calculator/.heddle fixture) is captured, not silently dropped. Operators who want the gitignore-spec “match anywhere” behavior for those names can write **/<name> explicitly.

Functions§

should_ignore
Whether path is covered by any of the .heddleignore patterns.