gemini-cli PR fixes CRLF diffs inflating every unchanged line in write_file
bitwizard25 · ghdev · 2026-11-27
PR #30489 in google-gemini/gemini-cli normalizes \r\n to \n before computing confirmation and result diffs and diffStat in writefile.ts.
- Root cause: raw CRLF content was diffed against LF model output, making every unchanged line appear removed and re-added, inflating +N/-N telemetry and rewind counts.
- Fix: normalize inputs to the diff functions while keeping raw originalContent for detectLineEnding, so CRLF is still preserved on disk.
- Tests: a regression test verifies overwriting 1 line of a 5-line CRLF file yields a 1-line diff with CRLF intact.
More from coding & agent
- Voice Agents = Text Agent + 3 Parts; Median 700ms Response Latency — adnan_hashmi · 2026-11-28
- Gx: A 13MB Rust App to Run Claude, Codex & OpenCode Side by Side — sull · 2026-11-28
- MedExAgent trains LLM agents to navigate clinical diagnosis amid noisy data and costly exams — mdredze · 2026-11-28
- Hugging Face Agents Course breaks down the Thought-Action-Observation cycle — adnan_hashmi · 2026-11-28
- WhisperX Tops 25.7K GitHub Stars: 70x Realtime Transcription With Word-Level Timestamps — solyarisoftware · 2026-11-28
- Anthropic's Building Effective Agents: Simple Composable Patterns Beat Complex Frameworks — adnan_hashmi · 2026-11-28