jacebrowning / gitman

Language-agnostic dependency manager using Git.
https://gitman.readthedocs.io
MIT License
198 stars 32 forks source link

About using gitman with CR/LF line ending setting #319

Open KaoNeo opened 11 months ago

KaoNeo commented 11 months ago

Hi Jace

I use the gitman to download project https://pypi.org/project/gitman/

And i have some question about autocrlf setting

With naive git command we could use the config parma core.autocrlf=false to replace line ending image [Example] git clone git@github.myproject.git --config core.autocrlf=false

Is there any way to set the line ending autocrlf (CR/LF) when using gitman?

jacebrowning commented 11 months ago

The params setting can be used to pass additional arguments to the git clone command: https://gitman.readthedocs.io/en/latest/setup/configuration/#gitman.models.source.Source--params

sel-carlitos commented 10 months ago

I work with Windows (to develop) and Linux (for production). But I don't pass anything in the params. I set this in Windows:

git config --global core.autocrlf 'input' git config --global core.eol 'lf'

I don't set anything on Linux.

Have a look at the documentation on both settings core.autocrlf and core.eol at 8.1 Customizing Git - Git Configuration. I haven't had any issues so far.

By the way, thanks for gitman @jacebrowning !!! It helps me a lot!!!