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
- User builds 20-bot Grok suite to track wins, prep 1:1s and close promises — NicoVerderosa · 2026-10-30
- LangChain CEO opens Interrupt London with keynote on why orgs should own their intelligence — LangChain · 2026-10-30
- Simlock: open-source control plane gives parallel coding agents their own iOS/Android simulators — Scobleizer · 2026-10-30
- YC experiment: Claude agents formed democracies while GPT agents formed hives — soumitrashukla9 · 2026-10-30
- Keyfleet launches open canvas where personal AI agents team up with a shared USDC treasury — seanwbren · 2026-10-30
- Page-based project management for Grok Bots: keep chats short, history on Pages — AiJohnAllen · 2026-10-30