git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[RESEND PATCH 3/3] Cleanup uninitialized value in chomp

From
Alex Riesen <raa.lkml@gmail.com>
Date
Jan 22, 2007, 17:13 UTC
Message-ID
<81b0412b0701220913k381ce400sd317f103064406f5@mail.gmail.com>

which happens if you use ActiveState Perl and a pipe workaround specially for it.

Signed-off-by: Alex Riesen <raa.lkml@gmail.com>
---
 perl/Git.pm |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
From d8fbca783d727aff0c7078330b7ec3d0894e9093 Mon Sep 17 00:00:00 2001
From: Alex Riesen <raa.lkml@gmail.com>
Date: Mon, 22 Jan 2007 15:58:03 +0100
Subject: [PATCH 3/3] Cleanup uninitialized value in chomp

which happens if you use ActiveState Perl and a pipe workaround specially for it.

Signed-off-by: Alex Riesen <raa.lkml@gmail.com>
---
 perl/Git.pm |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/perl/Git.pm b/perl/Git.pm
index 2f6b59a..c1729ba 100644
--- a/perl/Git.pm
+++ b/perl/Git.pm
@@ -275,7 +275,7 @@ sub command {
 
 	} else {
 		my @lines = <$fh>;
-		chomp @lines;
+		defined and chomp for @lines;
 		try {
 			_cmd_close($fh, $ctx);
 		} catch Git::Error::Command with {
-- 
1.5.0.rc2.g3f1a
Message 1 of 1 in “Cleanup uninitialized value in chomp”
  1. 3/3 Cleanup uninitialized value in chompAlex Riesen, Jan 22, 2007

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.