gemini-cli PR: Git Quoted Paths Silently Skipped Sensitive-Keyword Linting
HermanGrondahl · ghdev · 2026-12-05
A PR to Google's gemini-cli fixes a subtle bug: scripts/lint.js selected changed files via git diff --name-only and split on newlines, but Git quotes/escapes unusual pathnames, so the linter received a quoted representation that doesn't exist on disk — and the existsSync guard skipped the file before ever checking it for the forbidden model id.
The fix switches to NUL-separated output (git diff -z) and extracts a single diffNames(range) helper shared by the merge-base path and the HEAD1..HEAD fallback, so the two can't drift apart again. The author explains why core.quotePath=false was deliberately left out: under -z the flag is a no-op.
The new test spins up real git repos and runs the real linter as a subprocess, covering filenames with spaces, newlines, quotes, backslashes and Unicode, plus added/modified/deleted files, asserting on the linter's actual output.
More from coding & agent
- A developer's 2025 terminal stack: Rex shines, OpenCode still tops terminal agents — intellectronica · 2026-12-05
- Herdr turns any coding agent into a hosted desktop app you control from your phone — rudrank · 2026-12-05
- TokenMS v2: open-source local MCP server claims 40-50% token savings for coding agents — nexxismyname · 2026-12-05
- Knuth now programs with Claude; preview of new Art of Computer Programming chapter leaks — IanArawjo · 2026-12-05
- One engineer spent 8 years writing 600K lines: KUDA rival runs LLMs across NVIDIA and Qualcomm — IgorCarron · 2026-12-05
- Agentic shopping in practice: Grokbot as a personal shopper that negotiates — xkonjin · 2026-12-05