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

[PATCH] annotate: fix warning about uninitialized scalar

From
Matthias Kestenholz <matthias@spinlock.ch>
Date
Apr 28, 2006, 08:42 UTC
Message-ID
<20060428084228.GB4313@spinlock.ch>

Use of uninitialized value in scalar chomp at ./git-annotate.perl line 212, <$kid> chunk 4.

Signed-off-by: Matthias Kestenholz <matthias@spinlock.ch>
---
 git-annotate.perl |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
5322aefa820eef2d635d5dbf621269aefce52135
diff --git a/git-annotate.perl b/git-annotate.perl
index bf920a5..5f8a766 100755
--- a/git-annotate.perl
+++ b/git-annotate.perl
@@ -209,6 +209,9 @@ sub find_parent_renames {
 	while (my $change = <$patch>) {
 		chomp $change;
 		my $filename = <$patch>;
+		if(!$filename) {
+			next;
+		}
 		chomp $filename;
 
 		if ($change =~ m/^[AMD]$/ ) {
-- 
1.3.1.gc4586
Message 1 of 1 in “annotate: fix warning about uninitialized scalar”
  1. annotate: fix warning about uninitialized scalarMatthias Kestenholz, Apr 28, 2006

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.