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
Theodore Tso <tytso@mit.edu>
Date
Aug 11, 2026, 05:34 UTC
Message-ID
<anqu8TjyuvCkI948@mit.edu>
In-Reply-To
<AM0PR02MB445083767BAE669D4656CA6CB3DD2@AM0PR02MB4450.eurprd02.prod.outlook.com>
On Tue, Aug 11, 2026 at 02:13:25AM -0500, Skybuck Flying wrote:
> 
> So sed removes literal 'r' instead of carriage returns. It appears that on
> Windows, the backslash in `\r` is not preserved through MSYS argument parsing,
> effectively turning the expression into `s/r//`.

The reason for this confusion is historical in nature and has to do with a fundamental difference between Windows and Unix. First, understand that Unix predates Windows, with Unix being first developed by AT&T Bell Labs in 1969, where as Windows dates from 1985, with DOS dating from 1981. Unix uses the forward slash ('/') as a path separator. However Windows and DOS uses the backwards slash ('\') as a path separator, since DOS 1.0 used forward slashes for command-line switches --- e.g., DIR/W.

Since Windows and DOS uses backwards slash as a path separator, it can't be used as a quoting character, which is how Unix and Linux interprets the backlash character. Since MSYS (which is not developed by the Windows Git team; they just use it), attempts to be compatible with Unix / Linux, it uses backslash as quoting character. CMD.EXE and Powershell are Windows programs, which doesn't attempt to be Unix compatible.

This is the nature of your confusion. It's unfortunate that you find this to be so irritating, but it's fundamentally because DOS/Windows chose, back in the early 1980's, to be incompatible with Unix. I personally find Windows conventions to be irritating, and my way of dealing with the problem is to avoid using Windows whenever possible. Instead, I use MacOS and Linux, which doesn't have these Windows compatibility problems. Feel free to not use git, and to avoid anything else which attempts to be compatible with Unix or Linux if that brings you peace. I certainly was much happier once I no longer had to deal with Windows as part of my day job. :-)

Cheers,
						- Ted
Previous: Bradley MorganNext: Jeff King
Message 15 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.