From: Alex Riesen <hidden> Date: 2016-06-15 22:42:13
Activision's Perl generates CRLF unless STDOUT is binmoded, which is
inconsistent with other output of git-status.
---
I assume none _sane_ can want CRLF as line-ending...
From: "H. Peter Anvin" <hpa@zytor.com> Date: 2016-06-15 22:42:13
Alex Riesen wrote:
Activision's Perl generates CRLF unless STDOUT is binmoded, which is
inconsistent with other output of git-status.
---
I assume none _sane_ can want CRLF as line-ending...
Well, if it's a text file we probably should use platform-native
line-ending, and at least be tolerant of \r\n.
-hpa
From: Johannes Schindelin <hidden> Date: 2016-06-15 22:42:13
Hi,
On Mon, 28 Nov 2005, H. Peter Anvin wrote:
Alex Riesen wrote:
quoted
Activision's Perl generates CRLF unless STDOUT is binmoded, which is
inconsistent with other output of git-status.
---
I assume none _sane_ can want CRLF as line-ending...
Well, if it's a text file we probably should use platform-native line-ending,
and at least be tolerant of \r\n.
Of course, here is the problem: git on Windows runs only using cygwin. You
can specify the line ending behaviour of cygwin (I think it is an env
variable). Activision Perl, being independent of cygwin, does not care
about that setting.
So, to be accurate, you'd have to check what *cygwin* expects, and
depending on that execute binmode(STDOUT) or not.
Ciao,
Dscho
From: "H. Peter Anvin" <hpa@zytor.com> Date: 2016-06-15 22:42:13
Johannes Schindelin wrote:
Of course, here is the problem: git on Windows runs only using cygwin. You
can specify the line ending behaviour of cygwin (I think it is an env
variable). Activision Perl, being independent of cygwin, does not care
about that setting.
So, to be accurate, you'd have to check what *cygwin* expects, and
depending on that execute binmode(STDOUT) or not.
Makes sense, I guess... except if you're running Cygwin, wouldn't
Cygwin's Perl make a lot more sense?
-hpa
From: Junio C Hamano <hidden> Date: 2016-06-15 22:42:13
Alex Riesen [off-list ref] writes:
Activision's Perl generates CRLF unless STDOUT is binmoded, which is
inconsistent with other output of git-status.
I do not think this is a kind of patch that I should accept to
apply to the generic part of the codepath, even if on sane
platforms binmode() could be a no-op.
You should not have to say binmode() when you are emitting plain
text (otherwise you have to say that everywhere which is
madness). I presume the Cygwin version uses Perl from Cygwin
and would not have this problem?
If that is the case, maybe this patch should be maintained out
of tree by the maintainer of Windows port of git that does _not_
use Cygwin but ActiveState.
From: Tim O'Callaghan <hidden> Date: 2016-06-15 22:42:13
On Mon, Nov 28, 2005 at 10:31:05AM -0800, Junio C Hamano wrote:
Alex Riesen [off-list ref] writes:
quoted
Activision's Perl generates CRLF unless STDOUT is binmoded, which is
inconsistent with other output of git-status.
I do not think this is a kind of patch that I should accept to
apply to the generic part of the codepath, even if on sane
platforms binmode() could be a no-op.
You should not have to say binmode() when you are emitting plain
text (otherwise you have to say that everywhere which is
madness). I presume the Cygwin version uses Perl from Cygwin
and would not have this problem?
If that is the case, maybe this patch should be maintained out
of tree by the maintainer of Windows port of git that does _not_
use Cygwin but ActiveState.
You could also check `perl -v` for the phrase "built for cygwin". I am not
sure how much of an issue this is though, because native windows support is
going to be a bit tricky without Cygwin as you also need (ba)sh, sed, grep,
etc.
Tim.