All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Yagnatinsky, Mark" <mark.yagnatinsky@bofa.com>
To: "'Torsten Bögershausen'" <tboegi@web.de>
Cc: "'git@vger.kernel.org'" <git@vger.kernel.org>
Subject: RE: suggestion for improved docs on autocrlf
Date: Thu, 08 Aug 2019 23:08:14 +0000	[thread overview]
Message-ID: <577a66e0c26545aaa4795de3c5189c9d@bofa.com> (raw)
In-Reply-To: <3269668c03a8482d8d854ec19dd43907@bofa.com>

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.

  reply	other threads:[~2019-08-08 23:08 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-07 13:08 suggestion for improved docs on autocrlf Yagnatinsky, Mark
2019-08-08 20:56 ` Torsten Bögershausen
2019-08-08 21:19   ` Yagnatinsky, Mark
2019-08-08 23:08     ` Yagnatinsky, Mark [this message]
2019-08-09  3:34       ` Torsten Bögershausen
2019-08-09 15:34         ` Yagnatinsky, Mark
2019-08-11 12:10           ` Torsten Bögershausen
2019-08-12 13:47             ` Yagnatinsky, Mark
2019-08-12 15:46               ` Junio C Hamano
2019-08-12 15:52                 ` Yagnatinsky, Mark
2019-08-12 17:10               ` Torsten Bögershausen
2019-08-12 18:00                 ` Yagnatinsky, Mark
2019-08-12 18:18                   ` Junio C Hamano
2019-08-12 18:30                     ` Yagnatinsky, Mark
2019-08-13  3:24                     ` Torsten Bögershausen
2019-08-13 15:31                       ` Yagnatinsky, Mark
2019-08-13 15:40                         ` Torsten Bögershausen
2019-08-13 15:44                           ` Yagnatinsky, Mark
2019-08-14 16:28                             ` Yagnatinsky, Mark
2019-08-15  4:56                               ` Yagnatinsky, Mark
2019-08-16  4:20                                 ` Torsten Bögershausen
2019-08-16 19:12                                   ` Yagnatinsky, Mark
2019-08-13 16:40                           ` Junio C Hamano

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=577a66e0c26545aaa4795de3c5189c9d@bofa.com \
    --to=mark.yagnatinsky@bofa.com \
    --cc=git@vger.kernel.org \
    --cc=tboegi@web.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.