RE: suggestion for improved docs on autocrlf

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

 



Okay, my attempt at better wording for the docs is not going well, because it turns I that I still don't understand the behavior here!
I thought that "input" means that CRLF will become LF on "git add" but that seems to be true only sometimes.
For instance, consider the following 11-line shell script:

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

The output from the last git add is:

warning: CRLF will be replaced by LF in t2.txt.
The file will have its original line endings in your working directory.

Which is a very good warning indeed, but why does it only apply to the new file t2.txt?
Why does the existing file test.txt retain its CRLF line endings.

I am so confused.

Any pointers?

----------------------------------------------------------------------
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