Re: use binmode(STDOUT) in git-status
- From
Johannes Schindelin <johannes.schindelin@gmx.de>
- Date
- Nov 28, 2005, 16:02 UTC
- Message-ID
- <Pine.LNX.4.63.0511281700100.11362@wbgn013.biozentrum.uni-wuerzburg.de>
- In-Reply-To
- <438B2859.6060109@zytor.com>
Hi,
On Mon, 28 Nov 2005, H. Peter Anvin wrote:
Show 9 quoted lines
> 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.
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