pi-ext
bugabingas pi extensions
owned by bugabinga
docs: extend plan with edge-case gitignore tests
cc1d3b808620c0e270f395f795eef85790851678
Oliver Jan Krylow <oliver@bugabinga.net> ·
unsigned
Browse filesCompare with HEAD
Changed files (1)
73 73 - `/build/` anchors to the context root
74 74 - `src/noisy/` ignores the directory and descendants
75 75 - Multiple patterns from a multiline string
76 + - `**` matches any number of directory levels (`a/**/b`)
77 + - Character classes `[abc]` match single chars
78 + - Escaped specials (`\#`, `\!`, `\ `, `\*`) are treated as literals
79 + - Trailing-slash semantics: `build/` ignores only directories; `build` ignores files and directories
80 + - Multiple negations in sequence (`*.log` → `!a.log` → `!b.log`)
81 + - Nested directory patterns (`node_modules/**/package.json`)
82 + - Edge: pattern `*` does NOT match path separator (`a/b` should not match `*`)
77 84 3. **Implement replacement**
78 85 Create `extensions/llmiterate/gitignore.ts` with a `GitIgnoreMatcher` class:
85 92 - Unanchored patterns match at any depth
86 93 - Leading `/` anchors to the context root
87 94 - Applies patterns in order; negation flips state
88 - - Estimated: ~100 lines
95 + - Estimated: ~120 lines
90 97 4. **Swap dependency in `watcher.ts`**
91 98 - Remove `import ignore, { type Ignore } from "ignore";`