gitman icon indicating copy to clipboard operation
gitman copied to clipboard

About using gitman with CR/LF line ending setting

Open KaoNeo opened this issue 2 years ago • 2 comments

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 [email protected] --config core.autocrlf=false

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

KaoNeo avatar Nov 12 '23 23:11 KaoNeo

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

jacebrowning avatar Nov 13 '23 15:11 jacebrowning

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!!!

sel-carlitos avatar Jan 08 '24 23:01 sel-carlitos