Why does git flag files as changed when only the line endings are changed and normalization is on? -


case1: windows core.autocrlf=true when change line endings of text file lf these marked changes. normalized when committed there shouldn't changes.

case2: linux core.autocrlf=input when change line endings of text file crlf these marked changes. normalized when committed there shouldn't changes.

so why git flag files changed when line endings changed , normalization on?

from git documentation regarding autocrlf:

git can handle auto-converting crlf line endings lf when add file index, , vice versa when checks out code onto filesystem.

this option does, in nutshell. not pervade every single operation of git, git add , git checkout (and similar, i.e., git reset , others change working directory).

you might want text attribute in .gitattributes; maybe that's closer need.


Comments

Popular posts from this blog

jOOQ update returning clause with Oracle -

java - Warning equals/hashCode on @Data annotation lombok with inheritance -

java - BasicPathUsageException: Cannot join to attribute of basic type -