Files
go-task/go.sum
Valentin Maerten 70fe29314f refactor: replace sabhiram/go-gitignore with vendored go-git matcher
The sabhiram/go-gitignore dependency is unmaintained (since 2021) and has
known gitignore spec gaps (* traverses /, ? broken, weak ** handling).

Vendor the pattern/matcher core of go-git (plumbing/format/gitignore,
v5.19.1) into internal/gitignore instead. It is ~185 lines of pure-stdlib,
spec-correct code (proper **, anchoring, dir-only and negation handling).
The file-walking helpers (dir.go) are intentionally omitted as they pull in
go-billy and other go-git internals; importing the upstream package directly
would re-add that transitive weight, which is why go-git was dropped before.

This gains gitignore spec compliance while removing a direct dependency
rather than adding one. The vendored code keeps its Apache-2.0 license
(internal/gitignore/LICENSE) with attribution headers; upstream test cases
are ported to table-driven stdlib tests to avoid an extra test dependency.
2026-06-07 16:07:54 +02:00

30 KiB