Gemini CLI Fix: Resolves Full-File Diff Bloat on CRLF/Line Ending Mismatches

Aditya2584 · ghdev · 2026-08-30

Fixed a bug in getDiffContextSnippet that produced full-file diffs when comparing strings with mismatched line endings (LF vs CRLF). On Windows or with CRLF files, the function was dumping 100% of the file into the model's context instead of a compact snippet, causing severe context bloat. The fix normalizes line endings before computing diffs.

Original post →

More from coding & agent

coding & agent channel →