From: fossil-users [mailto:fossil-users-boun...@lists.fossil-scm.org] On Behalf Of Stephan Beal Sent: Tuesday, May 16, 2017 11:09 AM To: Fossil SCM user's discussion Subject: Re: [fossil-users] crlf-glob
On Tue, May 16, 2017 at 12:16 AM, Thomas <tho...@dateiliste.com> wrote: On 2017-05-15 23:09, Warren Young wrote: On May 15, 2017, at 3:27 PM, Thomas <tho...@dateiliste.com> wrote: Does it really matter in the 21st century if a line is terminated by CR, LF, or CR/LF anymore? Notepad.exe in Windows 10 Creator's Edition still only works properly with CR+LF. Since that's the default handler for *.txt on Windows, yes, line ending type still matters for any cross-platform project. So, after editing a file that belongs to your project with Notepad on Windows, would you expect an SCM complaining about it when you commit? I wouldn't. Real-life case: a developer on a banking project i worked on edited a shell script with notepad and checked it in (without having tested it). The SCM did not complain about Notepad-injected \r characters. After deployment on the live system this script started exiting with "bad interpreter". The reason, which we discovered only after opening the script in Emacs, which shows \r as ^M, was that notepad had mangled it, changing the first line to: #!/bin/sh^M The ^M (\r) is just another character for most Unix tools, and the system was treating the \r as part of the shell's name, which of course didn't work. Warning: one of my favourite complaints ahead ... Well, actually it gets worse. The CRLF is interpreted as a line separator, not an end-of-line marker. The last line may therefore miss that marker. So there is no distinction between a "complete" file and a truncated file. And then there is the BOM, which editors on Windows sometimes insert ... Regards, Arjen DISCLAIMER: This message is intended exclusively for the addressee(s) and may contain confidential and privileged information. If you are not the intended recipient please notify the sender immediately and destroy this message. Unauthorized use, disclosure or copying of this message is strictly prohibited. The foundation 'Stichting Deltares', which has its seat at Delft, The Netherlands, Commercial Registration Number 41146461, is not liable in any way whatsoever for consequences and/or damages resulting from the improper, incomplete and untimely dispatch, receipt and/or content of this e-mail. _______________________________________________ fossil-users mailing list fossil-users@lists.fossil-scm.org http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users