threads / patch / 4313

patchRE: [PATCH] Fixed Cygwin CR-munging problem in mailsplit

Subject: RE: [PATCH] Fixed Cygwin CR-munging problem in mailsplit

## tl;dr

3 messages between May 27, 2006 and May 31, 2006. Diffs are folded; open one to read it.

replies: 2people: 3as markdown or json

Zakirov, Salikh· May 27, 2006, 20:57 UTC · lore
Junio C Hamano <junkio@cox.net> writes:
> So even in this modern day, preserving CRLF is not
> something that happens by default -- you would need to make sure
> that everybody on your mailpath to the recipient is set up the
> right way.
> So now I am less in favor of the change than when I wrote that
> response.

I understand this reasoning, and I am not sure if the fix is correct from the "GIT world" point of view.

However, I believe that the command sequence git-format-patch, git-am without any e-mail transfer in between and in the same repository should work perfectly regardless of the contents of the files, no matter if they are binary, text, or "CRLF text" or even "broken LF and CRLF text". This is a requirement from a nasty "real world".

Junio, could you point at a right place to fix to get git-format-patch, git-am sequence work flawlessly on Cygwin?

By the way, the change affects only non-Unix users, as fopen(..., "rt") is equivalent to fopen(..., "rb") on all Unixes anyway.

Christopher Faylor· May 28, 2006, 16:39 UTC · re: Zakirov, Salikh · lore

Re: [PATCH] Fixed Cygwin CR-munging problem in mailsplit

On Sun, May 28, 2006 at 12:57:35AM +0400, Zakirov, Salikh wrote:
Show 24 quoted lines
>Junio C Hamano <junkio@cox.net> writes:
>> So even in this modern day, preserving CRLF is not
>> something that happens by default -- you would need to make sure
>> that everybody on your mailpath to the recipient is set up the
>> right way.
>
>> So now I am less in favor of the change than when I wrote that
>> response.
>
>I understand this reasoning, and I am not sure if the fix is correct
>from the "GIT world" point of view.
>
>However, I believe that the command sequence git-format-patch, git-am
>without any e-mail transfer in between and in the same repository
>should work perfectly regardless of the contents of the files, 
>no matter if they are binary, text, or "CRLF text" or even 
>"broken LF and CRLF text". This is a requirement from a nasty "real
>world".
>
>Junio, could you point at a right place to fix to get git-format-patch, 
>git-am sequence work flawlessly on Cygwin?
>
>By the way, the change affects only non-Unix users, as fopen(..., "rt")
>is equivalent to fopen(..., "rb") on all Unixes anyway.
But fopen(..., "r") is not equivalent to fopen(..., "rb") on Cygwin.
Wouldn't you want to add the "b" there to be assured of a binary open?
cgf
Junio C Hamano· May 31, 2006, 04:49 UTC · re: Zakirov, Salikh · lore

Re: [PATCH] Fixed Cygwin CR-munging problem in mailsplit

"Zakirov, Salikh" <salikh.zakirov@intel.com> writes:
Show 6 quoted lines
> However, I believe that the command sequence git-format-patch, git-am
> without any e-mail transfer in between and in the same repository
> should work perfectly regardless of the contents of the files, 
> no matter if they are binary, text, or "CRLF text" or even 
> "broken LF and CRLF text". This is a requirement from a nasty "real
> world".
OK, that's a very valid argument.  Thanks for straighten me out.

← back to recent threads