From: "Torsten Bögershausen" <tboegi@web.de>
To: Alex Henrie <alexhenrie24@gmail.com>
Cc: git@vger.kernel.org, avarab@gmail.com, tao@klerks.biz,
gitster@pobox.com, prohaska@zib.de, eyvind.bernhardsen@gmail.com
Subject: Re: [PATCH v2] convert: clarify line ending conversion warning
Date: Wed, 6 Apr 2022 20:04:34 +0200 [thread overview]
Message-ID: <20220406180434.4zlb2bwpu6cfumta@tb-raspi4> (raw)
In-Reply-To: <20220405053559.1072115-1-alexhenrie24@gmail.com>
On Mon, Apr 04, 2022 at 11:35:59PM -0600, Alex Henrie wrote:
> The warning about converting line endings is extremely confusing. Its
> two sentences each use the word "will" without specifying a timeframe,
> which makes it sound like both sentences are referring to the same
> timeframe. On top of that, it uses the term "original line endings"
> without saying whether "original" means LF or CRLF.
>
> Rephrase the warning to be clear about when the line endings will be
> changed and what they will be changed to.
>
> On a platform whose native line endings are not CRLF (e.g. Linux), the
> "git add" step in the following sequence triggers the warning in
> question:
>
> $ git config core.autocrlf true
> $ echo 'Hello world!' >hello.txt
> $ git add hello.txt
> warning: LF will be replaced by CRLF in hello.txt
> The file will have its original line endings in your working directory
>
> Signed-off-by: Alex Henrie <alexhenrie24@gmail.com>
> ---
> v2:
> - Quote the confusing warning in the above commit message
> - Move the file name to the beginning of the warning message
> - Put the file name in single quotes
> - Use the arguably broader verb "touch" instead of "check out"
> - Remove the period at the end of the sentence
> - Remove the second sentence entirely
> ---
> convert.c | 10 ++++------
> t/t0027-auto-crlf.sh | 8 ++++----
> 2 files changed, 8 insertions(+), 10 deletions(-)
>
> diff --git a/convert.c b/convert.c
> index 8e39731efb..733e581cb9 100644
> --- a/convert.c
> +++ b/convert.c
> @@ -195,9 +195,8 @@ static void check_global_conv_flags_eol(const char *path,
> if (conv_flags & CONV_EOL_RNDTRP_DIE)
> die(_("CRLF would be replaced by LF in %s"), path);
> else if (conv_flags & CONV_EOL_RNDTRP_WARN)
> - warning(_("CRLF will be replaced by LF in %s.\n"
> - "The file will have its original line"
> - " endings in your working directory"), path);
> + warning(_("In '%s', CRLF will be replaced by LF the"
> + " next time Git touches it"), path);
(Somewhat late to the discussions), thanks for picking this up.
May be we can use "updates" instead of "touches" ?
"In '%s', CRLF will be replaced by LF the next time Git updates it"
Or may be
"In '%s', CRLF will be replaced by LF the next time a `git checkout` updates it"
[snip]
next prev parent reply other threads:[~2022-04-06 19:12 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-04-05 5:35 [PATCH v2] convert: clarify line ending conversion warning Alex Henrie
2022-04-05 8:45 ` Ævar Arnfjörð Bjarmason
2022-04-05 16:44 ` Alex Henrie
2022-04-06 15:29 ` Junio C Hamano
2022-04-06 18:04 ` Torsten Bögershausen [this message]
2022-04-06 18:18 ` Tao Klerks
2022-04-06 18:30 ` Alex Henrie
2022-04-06 19:45 ` Junio C Hamano
2022-04-06 19:42 ` Junio C Hamano
2022-04-08 4:41 ` [PATCH v3] " Alex Henrie
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=20220406180434.4zlb2bwpu6cfumta@tb-raspi4 \
--to=tboegi@web.de \
--cc=alexhenrie24@gmail.com \
--cc=avarab@gmail.com \
--cc=eyvind.bernhardsen@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=prohaska@zib.de \
--cc=tao@klerks.biz \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).