leon-ai / leon-cli

⌨️ Command-line interface (CLI) for a better use of Leon, your open-source personal assistant. GNU/Linux, macOS and Windows supported.
https://getleon.ai
MIT License
176 stars 21 forks source link

[Improvement] drop .gitattributes altogether? #203

Closed silpol closed 1 year ago

silpol commented 1 year ago

Type of Improvement

Files and Folders Structure

Proposal

your .gitattributes has only one line * text=auto eol=lf

however, this item on Stackoverflow claims

Git 2.10 fixed this and now behaves as one would expect.

So there should be no need in this file anymore.

theoludwig commented 1 year ago

Hey! @silpol

Thanks for the suggestion of improvement. I'm not sure on this one, this .gitattributes is here to normalize line endings to LF even for people using Windows.

Per the git documentation: https://git-scm.com/docs/gitattributes#_eol

Set to string value "lf"

This setting forces Git to normalize line endings to LF on checkin and prevents conversion to CRLF when the file is checked out.

Which is exactly what we want, to force line endings to LF for all files. We're using https://github.com/editorconfig-checker/editorconfig-checker for linting, and it should check that all files end_of_line = lf.

If someone create a CRLF file and commit it to git, thanks to this .gitattributes the file should be automatically converted to LF, if I am not mistaken.

I'm not using Windows, but GNU/Linux Ubuntu, but want anyone able to contribute easily without trouble/configuration while still following basic "conventions".