git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* use binmode(STDOUT) in git-status
@ 2005-11-28  7:34 Alex Riesen
  2005-11-28 15:55 ` H. Peter Anvin
  2005-11-28 18:31 ` use binmode(STDOUT) in git-status Junio C Hamano
  0 siblings, 2 replies; 11+ messages in thread
From: Alex Riesen @ 2005-11-28  7:34 UTC (permalink / raw)
  To: git; +Cc: Junio C Hamano

[-- Attachment #1: Type: text/plain, Size: 178 bytes --]

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...

[-- Attachment #2: 0001-use-binmode-on-STDOUT-to-avoid-generation-of-CRLF-by-activision-perl.txt --]
[-- Type: text/plain, Size: 778 bytes --]

Subject: [PATCH] use binmode on STDOUT to avoid generation of CRLF by activision perl

Signed-off-by: Alex Riesen <fork0@gmail.com>


---

 git-status.sh |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

applies-to: c64901fa1a7f5fa19d025a315bcd1e5d5eae5d93
0fc9f4bdb41725d2b2b54e70ff4740bdb826bdea
diff --git a/git-status.sh b/git-status.sh
index b90ffc1..2fc7595 100755
--- a/git-status.sh
+++ b/git-status.sh
@@ -82,13 +82,14 @@ else
         --exclude-per-directory=.gitignore
 fi |
 perl -e '$/ = "\0";
+	binmode(STDOUT);
 	my $shown = 0;
 	while (<>) {
 		chomp;
 		s|\\|\\\\|g;
 		s|\t|\\t|g;
 		s|\n|\\n|g;
-		s/^/#	/;
+		s/^/#\t/;
 		if (!$shown) {
 			print "#\n# Untracked files:\n";
 			print "#   (use \"git add\" to add to commit)\n#\n";
---
0.99.9.GIT

^ permalink raw reply related	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2005-11-29 23:56 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-11-28  7:34 use binmode(STDOUT) in git-status Alex Riesen
2005-11-28 15:55 ` H. Peter Anvin
2005-11-28 16:02   ` Johannes Schindelin
2005-11-28 16:08     ` H. Peter Anvin
2005-11-28 16:56       ` Johannes Schindelin
2005-11-29 22:12         ` Alex Riesen
2005-11-29 22:44           ` [OT] Activision (Re: use binmode(STDOUT) in git-status) Junio C Hamano
2005-11-29 23:56             ` Johannes Schindelin
2005-11-28 18:31 ` use binmode(STDOUT) in git-status Junio C Hamano
2005-11-29 10:05   ` Tim O'Callaghan
2005-11-29 11:44     ` Johannes Schindelin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).