git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: AI Textconv filter misconfiguration on Windows leads to silent corruption of diff output (ongoing investigation)

From
Jeff King <peff@peff.net>
Date
Aug 11, 2026, 03:40 UTC
Message-ID
<20260811034001.GA15552@coredump.intra.peff.net>
In-Reply-To
<AM0PR02MB445096594555DAD1D9EE1505B3DD2@AM0PR02MB4450.eurprd02.prod.outlook.com>
On Tue, Aug 11, 2026 at 12:44:42AM +0000, Skybuck Flying wrote:
Show 7 quoted lines
> - 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:

Show 5 quoted lines
> 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
Previous: Theodore Tso
Message 16 of 16 in “AI Textconv filter misconfiguration on Windows leads to silent corruption of diff output (ongoing investigation)”
  1. Skybuck FlyingAug 11, 2026
  2. Skybuck FlyingAug 11, 2026
  3. Skybuck FlyingAug 11, 2026
  4. Skybuck FlyingAug 11, 2026
  5. Skybuck FlyingAug 11, 2026
  6. Skybuck FlyingSep 1, 2026
  7. Skybuck FlyingSep 1, 2026
  8. Skybuck FlyingSep 1, 2026
  9. rsbecker@nexbridge.comSep 1, 2026
  10. Skybuck FlyingSep 2, 2026
  11. Skybuck FlyingSep 2, 2026
  12. D. Ben KnobleSep 2, 2026
  13. Skybuck FlyingSep 2, 2026
  14. Bradley MorganAug 21, 2026
  15. Theodore TsoAug 11, 2026
  16. Jeff KingAug 11, 2026

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.