From: "Torsten Bögershausen" <tboegi@web.de>
To: "brian m. carlson" <sandals@crustytoothpaste.net>,
Spencer Fretwell <spencer.fretwell@gmail.com>,
git@vger.kernel.org
Subject: Re: Verbose Commit Ignore Line Fails via CRLF Line Endings
Date: Fri, 11 Oct 2024 06:45:05 +0200 [thread overview]
Message-ID: <20241011044505.GA1764@tb-raspi4> (raw)
In-Reply-To: <ZwWNgc6JY46bmcjE@tapette.crustytoothpaste.net>
On Tue, Oct 08, 2024 at 07:52:33PM +0000, brian m. carlson wrote:
> On 2024-10-08 at 19:34:46, Spencer Fretwell wrote:
> > Thanks Brian,
> >
> > It appears sublime auto-normalizes endings to "whatever occurs most
> > frequently in the first 32kB". So, I guess it was witnessing the CRLF
> > from the verbose output and replacing all lines with CRLF. Thanks for
> > the reminder about --renormalize.
> >
> > Is there any chance for git to support a CRLF magic ignore line,
> > particularly considering the variation in standard line ending across
> > different platforms? I tried autocrlf=input as well and it sadly
> > doesn't normalize the commit message file itself. Either way (magic
> > ignore with CRLF or normalizing line endings in the commit message),
> > would be appreciated for mixed line ending workflows (especially
> > considering WSL)
>
> The answer is essentially that I don't know. We typically make
> decisions on whether we'll accept features when we see the patch. My
> guess is that, assuming someone (maybe you) sends a patch, it will
> probably be accepted, since I wouldn't expect it would be very difficult
> to do or have major impacts on the code. It might, as with any patch,
> take a couple of rounds, though.
>
> I use Linux or rarely other Unix systems and always use LF endings, so I
> don't plan to send a patch since this doesn't affect me, but assuming
> the patch looked reasonable, I don't see myself having an objection to
> it.
Hej Spencer,
you are probably the first one reporting this, thanks for doing so.
I have the suspicion, that your repo has files commit with CRLF,
and that leads to a CRLF entering the diff, and that leads your
editor to produce CRLF in the commit-message.
In order to debug this a little bit, can you run a
git ls-files --eol | grep i/crlf
in your repo ?
In general, when working with cross-platform, or only with windows,
it is a good practice to use a .gitattributes file to specify the
line endings.
Do you have such a file in your repo, and is it commited ?
next prev parent reply other threads:[~2024-10-11 4:45 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-08 18:30 Verbose Commit Ignore Line Fails via CRLF Line Endings Spencer Fretwell
2024-10-08 18:37 ` Spencer Fretwell
2024-10-08 19:09 ` brian m. carlson
2024-10-08 19:34 ` Spencer Fretwell
2024-10-08 19:52 ` brian m. carlson
2024-10-11 4:45 ` Torsten Bögershausen [this message]
[not found] ` <8f3922dd-83d3-4860-a25a-ce52d9d08d7c@mail.shortwave.com>
2024-10-11 16:10 ` Torsten Bögershausen
2024-10-11 17:59 ` Junio C Hamano
2024-10-08 19:02 ` brian m. carlson
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=20241011044505.GA1764@tb-raspi4 \
--to=tboegi@web.de \
--cc=git@vger.kernel.org \
--cc=sandals@crustytoothpaste.net \
--cc=spencer.fretwell@gmail.com \
/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).