What happens to files that are checked out, when working-tree-encoding chanages in .gitattributes

Viewed 38

I assume if I had a .gitattributes file thus

*.abc working-tree-encoding=ISO8859-1 text

And committed a file 123.abc and then changed the .gitattributes file to

*.abc working-tree-encoding=IBM-1047 text

A "git checkout" of the file will mean its encoding would be changed to IBM-1047.

But what if the original .gitattributes file was

*.abc binary

and the 123.abc file is committed and the .gitattributes file change to

*.abc working-tree-encoding=IBM-1047 text

Would a git checkout of the file cause the file to come back as binary (because it was committed as binary) or would Git assume the file was stored internally as UTF- and attempt to create a IBM-1047 encoded file.

0 Answers
Related