1

From the documentation here: https://git-scm.com/book/en/v2/Customizing-Git-Git-Configuration#__code_core_autocrlf_code , I can conclude that core.autoclrf=true does exactly what core.autoclrf=input (which is to convert files to LF when adding to the index) plus converting to CRLF on checkout.

However the doc is not explicit about this, so I would like to validate whether this is true.

Marinos An
  • 9,481
  • 6
  • 63
  • 96

1 Answers1

1

The explanation in the manual is much more concise

Setting this variable to "true" is the same as setting the text attribute to "auto" on all files and core.eol to "crlf". Set to true if you want to have CRLF line endings in your working directory and the repository has LF line endings. This variable can be set to input, in which case no output conversion is performed.

And for what the text attribute does

This attribute enables and controls end-of-line normalization. When a text file is normalized, its line endings are converted to LF in the repository.

So your intuition is correct. core.autocrlf=input normalizes all files to LF endings in the index, while core.autocrlf=true additionally forces CRLF endings in your working directory.

Max
  • 21,123
  • 5
  • 49
  • 71