From: "Theodore Tso" <tytso@mit.edu>
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: Tue, 11 Aug 2026 01:34:34 -0400 [thread overview]
Message-ID: <anqu8TjyuvCkI948@mit.edu> (raw)
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
next prev parent reply other threads:[~2026-08-11 5:35 UTC|newest]
Thread overview: 6+ 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 5:34 ` Theodore Tso [this message]
2026-08-11 3:40 ` Jeff King
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=anqu8TjyuvCkI948@mit.edu \
--to=tytso@mit.edu \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.