From: Johannes Sixt Date: Thu, 26 Oct 2017 20:20:58 GMT Subject: Re: Consequences of CRLF in index? Message-ID: <7a4396e8-7b97-9ec9-d028-c5ad29042c86@kdbg.org> In-Reply-To: <30ED36AB-FAB1-4635-94AF-FCEC6F02CE01@gmail.com> Am 26.10.2017 um 13:01 schrieb Lars Schneider: >> On 26 Oct 2017, at 09:09, Johannes Sixt wrote: >> Am 25.10.2017 um 14:19 schrieb Johannes Schindelin: >>> I envy you for the blessing of such a clean C++ source that you do not >>> have any, say, Unix shell script in it. Try this, and weep: >>> $ printf 'echo \\\r\n\t123\r\n' >a1 >>> $ sh a1 >>> a1: 2: a1: 123: not found >> >> I was bitten by that, too. For this reason, I ensure that shell scripts and Makefiles begin their life on Linux. Fortunately, modern editors on Windows, includ^Wand vi, do not force CRLF line breaks, and such files can be edited on Windows, too. > > Wouldn't this kind of .gitattributes setup solve the problem? But there is no problem. Don't have CRs in shell scripts and be done with it. > > * -text > *.sh text eol=lf Why would that be necessary? I cannot have CRLF in shell scripts etc., not even on Windows. (And in addition I do not mind CR in C++ source code.) All I want is: Git, please, by all means, do not mess with my files, ever. Isn't the simplest way to achieve that to set *nothing* at all? Not even core.autocrlf? -- Hannes