aider icon indicating copy to clipboard operation
aider copied to clipboard

Line ending encoding

Open sa-obgit-backend opened this issue 1 year ago • 3 comments

Issue

On windows aider is changing the line endings of the repository to CRLF at modifiying and creating files. This will lead to an error at git commit if "safecrlf" is activated. Is there a possibilty to set the lineendings for aider to LF ?

Version and model info

Aider v0.50.0. Model ChatGPT4o

sa-obgit-backend avatar Aug 16 '24 06:08 sa-obgit-backend

All of my IDEs editors and tooling on Windows support LF instead of CRLF just fine so I use

git config --global core.autocrlf false

And set .editorconfig to use LF.

But Aider doesn't respect that and uses CRLF.

StevenTCramer avatar Aug 30 '24 14:08 StevenTCramer

Yes, sure, but as I said the problem is core.safecrlf. I think you has not configured it to yes 😊

I do not think that aider should respect the config of git, there could be simply a config which lineending aider should create 😊

And even if you use autocrlf false, your local file will stay CRLF after aider and so you have inconsistent file endings.

Von: Steven T. Cramer @.> Gesendet: Freitag, 30. August 2024 16:39 An: paul-gauthier/aider @.> Cc: SA-OBGIT-Backend @.>; Author @.> Betreff: Re: [paul-gauthier/aider] Line ending encoding (Issue #1102)

Einige Personen, die diese Nachricht erhalten haben, erhalten nicht oft eine E-Mail von @.@.>. Erfahren Sie, warum dies wichtig isthttps://aka.ms/LearnAboutSenderIdentification

All of my IDEs editors and tooling on Windows support LF instead of CRLF just fine so I use

git config --global core.autocrlf false

And set .editorconfig to use LF.

But Aider doesn't respect that and uses CRLF.

— Reply to this email directly, view it on GitHubhttps://github.com/paul-gauthier/aider/issues/1102#issuecomment-2321468087, or unsubscribehttps://github.com/notifications/unsubscribe-auth/A5475KBQZG4L3ZCHIYJVUDDZUB7X3AVCNFSM6AAAAABMTPT7LWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGMRRGQ3DQMBYG4. You are receiving this because you authored the thread.Message ID: @.@.>>

sa-obgit-backend avatar Aug 30 '24 14:08 sa-obgit-backend

@sa-obgit-backend I am agreeing with you. And showing other case where being able to control Aiders LF/CRLF would be nice.

StevenTCramer avatar Aug 30 '24 14:08 StevenTCramer