I've created a workspace (on Windows) and set the line endings parameter to unix because I need each and every file to have LF line endings.
However, once everything was downloaded and synced, a small number of text files had CRLF as line endings. I couldn't find any pattern that would single them out.
There isn't any kind of rule. I have a folder full of msg_##.txt with ## going from 01 to 46. Every single file had LF line endings. Every single file except for msg_26.txt, which had CRLF. I've also two .py files in the same folder, one with LF, the other with CRLF. The CRLF one was quite big at 225KB, but I found no other pattern.
What reasons would there be for P4 to treat some of the files differently?
Perforce assumes all of the files that were committed to the server have
LFline endings. Because of that, when you chooseunixas preferred line ending, perforce downloads files as is, since all the files on server haveLFline endings anyway. The problem is, Perforce does not enforce that every file committed to the server hasLF.The files that were causing me problems were probably somehow stored on the server with
CRLFline endings and that was what I got when I downloaded them.