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
- How Much Agent Swarm Hype Is Just Distributed Systems Rediscovered? — edgarpavlovsky · 2026-11-30
- Know PyTorch vs. Know What PyTorch Does: A 5-Step Learning Path — cneuralnetwork · 2026-11-30
- PAL adds E2EE multi-machine remote memory for Claude Code with BYO S3 — rchardkovacs · 2026-11-30
- Reddit asks: did anyone keep autoresearch agent loops in daily workflows? — Jumpy-Cobbler1020 · 2026-11-30
- Dev ports 4 Obsidian plugins to Antigravity native plugins, all open-sourced on GitHub — vista8 · 2026-11-30
- Tactile sensing remains fragmented across 18 sensors; year-long push for a ROS 2 standards working group finds no takers — kscottz · 2026-11-30