Should windows files like .cmd be saved in libbitcoin repo with windows line endings CRLF or not? I see there are not. Is it simply the rule that in your repo all the files are stored with LF? What are the best github practices?
5 replies · neillm, ldz, evoskuil · last Nov 28, 2020
Not sure, I don't use windows, but I think it's safe to use the 'unix' convention across the board, as it's compatible in both (if I recall correctly ... ?)
To be frank I don't know that consequences the lack of CR on windows has. I lack the knowledge. For a git user I believe it doesn't matter much. On windows the git (default VS config) knows what to do during pulling and automatically adds CR. While pushing, I don't know what would happen. Perhaps it requires configuration on the client side. Apart from that there are also third part systems like appveyor and I don't know how important this is to them.
As far as I see and what stackoverflow says the windows defualt strategy is "core.autocrlf=true". That means convert lines to CRLF on checkout and convert lines to LF when adding files. On linux the strategy is "=input". That doesn't convert lines on checkout and convert lines to LF if needed when adding files. It sounds very clear and reasonable. If other systems (like appveyor) stick to this convention, I do not see a problem either.