gemini-cli PR fixes nested .gitignore trailing-slash patterns wrongly anchored
dylanyunlon · ghdev · 2026-09-14
A PR against google-gemini/gemini-cli fixes a bug where trailing-slash patterns (e.g. build/) in a nested .gitignore were incorrectly anchored to the .gitignore's own directory instead of matching at any depth, so pkg/tools/build/out.js wasn't ignored as git would.
The root cause: processPatterns() used !p.includes('/') to decide on a / prefix, and the trailing slash itself contains /. Per gitignore(5), a trailing slash only restricts matching to directories. The fix adds hasContentSlash(), which strips the trailing slash before checking for remaining slashes, rewriting build/ as /pkg//build/. The PR adds 16 unit and regression tests covering trailing/middle slashes, wildcards, and negation.
More from coding & agent
- Cloudflare ships granular authz for Workers, its most requested feature — dinasaur_404 · 2026-09-15
- px0 adds millisecond full-text search, project-wide file open and auto-reload — arpit_bhayani · 2026-09-15
- Cloudflare adds granular authz to Workers with four roles for teammates and agents — dinasaur_404 · 2026-09-15
- Pick one coding agent harness, learn it deeply, and stop switching tools — iannuttall · 2026-09-15
- Hypothesis creator hiring London engineers for Hegel, open-source property-based testing — xuanalogue · 2026-09-15
- Adaption AI launches Invent API: training datasets from a prompt, no strings attached — sarahookr · 2026-09-15