Gemini CLI Fix: Detect Mixed Line Endings to Prevent Full File Rewrites
shoemoney · ghdev · 2026-08-24
This PR fixes a bug in the detectLineEnding function in Google's Gemini CLI. The previous logic classified a file as CRLF if it contained even a single \r\n sequence, causing files with mixed line endings (mostly LF) to be fully rewritten to CRLF on minor edits. The fix implements a purity-based check, returning CRLF only if all newlines match that style, preventing destructive, unintended diffs.
More from coding & agent
- YC F26's Praxis launches AI agents to run law firm ops end to end — ycombinator · 2026-10-16
- Developer builds inter-agent messaging for his AI agents — complete with message undo — baditaflorin · 2026-10-16
- iOS 'dots' workflow: one Siri command turns screenshots into a background shopping and saving agent — nickbaumann_ · 2026-10-16
- Your widget tree is already a list of options: where Jev fits in Flutter — rseroter · 2026-10-16
- How OpenAI's Codex went from failed side project to 40M weekly users in under a year — danshipper · 2026-10-16
- Photon 2.0 launches unified messaging API for AI agents across iMessage and more — Scobleizer · 2026-10-16