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

[laroche@redhat.com: gitweb.cgi]

From
FRFlorian La Roche <laroche@redhat.com>
Date
Sep 25, 2006, 16:19 UTC
Message-ID
<20060925161934.GA18951@dudweiler.stuttgart.redhat.com>
Hello git crew,

I'm not a big perl prorammer, but the following removes perl warnings about accessing undefined vars.

regards,
Florian La Roche

--- gitweb/gitweb.perl +++ gitweb/gitweb.perl

@@ -427,7 +427,9 @@ sub esc_html {
 	my $str = shift;
 	$str = decode("utf8", $str, Encode::FB_DEFAULT);
 	$str = escapeHTML($str);
-	$str =~ s/\014/^L/g; # escape FORM FEED (FF) character (e.g. in COPYING file)
+	if (defined $str) {
+		$str =~ s/\014/^L/g; # escape FORM FEED (FF) character (e.g. in COPYING file)
+	}
 	return $str;
 }
 
@@ -2860,10 +2819,14 @@ sub git_log {
 		my $ref = format_ref_marker($refs, $commit);
 		my %co = parse_commit($commit);
 		next if !%co;
+		my $esc_title = $co{'title'};
+		if (defined $esc_title) {
+			$esc_title = esc_html($esc_title);
+		}
 		my %ad = parse_date($co{'author_epoch'});
 		git_print_header_div('commit',
 		               "<span class=\"age\">$co{'age_string'}</span>" .
-		               esc_html($co{'title'}) . $ref,
+		               $esc_title . $ref,
 		               $commit);
 		print "<div class=\"title_text\">\n" .
 		      "<div class=\"log_link\">\n" .
Next: Jakub Narebski
Message 1 of 2 in “[laroche@redhat.com: gitweb.cgi]”
  1. Florian La RocheSep 25, 2006
  2. Jakub NarebskiSep 25, 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.