RE: suggestion for improved docs on autocrlf

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



After correcting spelling of renormalize, the end result of the script you gave is that line endings in working directory are CRLF, and in the repo are LF.
Is that expected?  Surprising?  Not sure what you were trying to test there.  I also fixed my script to use printf, new version is:
(using copy/paste this time, instead typing from memory like last time; learned my lesson).

mkdir empty
cd empty
git init
git config core.autocrlf false
printf '1\r\n2' > test.txt
git add .
git commit -m test
git config core.autocrlf input
cp test.txt t2.txt
printf 'a\r\nb' > test.txt
git add .

Thank you for ls-files, I've been resorting to deleting from working directory and then doing a checkout.
And also thank you for the gem of "od -c"!
The output of ls-files after running my script is:

i/lf    w/crlf  attr/                   t2.txt
i/crlf  w/crlf  attr/                   test.txt

So I'm still confused.  Why didn't test.txt lose its CRs while t2.txt did?

----------------------------------------------------------------------
This message, and any attachments, is for the intended recipient(s) only, may contain information that is privileged, confidential and/or proprietary and subject to important terms and conditions available at http://www.bankofamerica.com/emaildisclaimer.   If you are not the intended recipient, please delete this message.



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux