Skip to content

Incorrect handling of line endings in ignore file parsers #23891

@xoma-zver

Description

@xoma-zver

What happened?

The GitIgnoreParser and IgnoreFileParser classes do not correctly handle different line endings (LF \n, CRLF \r\n, CR \r) in ignore files like .gitignore and .geminiignore. This can lead to incorrect pattern parsing, especially on Windows.

What did you expect to happen?

Ignore files with any line endings are parsed correctly, ignoring line ending differences.

Client information

Client Information

Run gemini to enter the interactive CLI, then run the /about command.

> /about
│ About Gemini CLI                                                                                                     │
│                                                                                                                      │
│ CLI Version                              0.35.1                                                                      │
│ Git Commit                               8804fb770                                                                   │
│ Model                                    Auto (Gemini 3)                                                             │
│ Sandbox                                  no sandbox                                                                  │
│ OS                                       win32                                                                       │
│ Auth Method                              Signed in with Google (@gmail.com)                             │
│ Tier                                     Gemini Code Assist in Google One AI Pro  

Login information

No response

Anything else we need to know?

No response

Metadata

Metadata

Assignees

Labels

area/coreIssues related to User Interface, OS Support, Core Functionalityhelp wantedWe will accept PRs from all issues marked as "help wanted". Thanks for your support!priority/p3Backlog - a good idea but not currently a priority.type/bug

Type

No fields configured for Bug.

Projects

Status

Closed

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions