Git development
 help / color / mirror / Atom feed
From: Jeff King <peff@peff.net>
To: Skybuck Flying <skybuck2000@hotmail.com>
Cc: Git <git@vger.kernel.org>
Subject: Re: AI Textconv filter misconfiguration on Windows leads to silent corruption of diff output (ongoing investigation)
Date: Mon, 10 Aug 2026 23:40:01 -0400	[thread overview]
Message-ID: <20260811034001.GA15552@coredump.intra.peff.net> (raw)
In-Reply-To: <AM0PR02MB445096594555DAD1D9EE1505B3DD2@AM0PR02MB4450.eurprd02.prod.outlook.com>

On Tue, Aug 11, 2026 at 12:44:42AM +0000, Skybuck Flying wrote:

> - compareCache appeared as compaeCache
> - return appeared as eturn
> - from appeared as fom
> - var appeared as va
> - for appeared as fo
> - cacheReader appeared as cacheReade
> - CompareAndSwap appeared as CompaeAndSwap

So all of your r's are gone...

> Global .gitconfig:
> diff.lfclean.textconv=sed -e s/\r//

...and here you don't quote against the shell. So the shell is probably
converting "\r" into just "r", and thus sed is removing them.

The same thing would be a problem on Linux as well as Windows.

I felt clever at spotting this immediately, but then this is already in
your text later:

> So the command does strip the literal character 'r' instead of
> carriage returns. The likely reason is that the backslash before r is
> not preserved through the shell argument parsing on Windows;
> effectively, the expression becomes s/r//, which deletes all 'r'
> characters.

So...what's the question? This is a misconfiguration on your part.
Perhaps Git's documentation could be more clear that there will be a
shell involved, but using a shell is normal for (almost) all
user-specified commands run by Git.

-Peff

      parent reply	other threads:[~2026-08-11  3:40 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-11  0:44 AI Textconv filter misconfiguration on Windows leads to silent corruption of diff output (ongoing investigation) Skybuck Flying
2026-08-11  2:13 ` Skybuck Flying
2026-08-11  2:19   ` Skybuck Flying
2026-08-11  4:26     ` Skybuck Flying
2026-08-11 15:06       ` Skybuck Flying
2026-08-11  5:34   ` Theodore Tso
2026-08-11  3:40 ` Jeff King [this message]

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=20260811034001.GA15552@coredump.intra.peff.net \
    --to=peff@peff.net \
    --cc=git@vger.kernel.org \
    --cc=skybuck2000@hotmail.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