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

[gitweb PATCH] Kill warnings in Webserver Error Log

From
Jochen Roemling <jochen@roemling.net>
Date
May 30, 2005, 19:34 UTC
Message-ID
<429B6AD4.9010107@roemling.net>
The following patch kills two warnings in the Web Server Error Log:

[Mon May 30 21:24:15 2005] gitweb.cgi: "my" variable %co masks earlier declaration in same scope at /home/www/html/tools/cgi-bin/gitweb.cgi line 1658. [Mon May 30 21:25:46 2005] gitweb.cgi: "my" variable %co masks earlier declaration in same scope at /home/www/html/tools/cgi-bin/gitweb.cgi line 1615.

There might be a patch offset of few lines because I deleted my local gitweb settings from the patch.

Signed-off-by: Jochen Roemling <jochen@roemling.net>

--- /cgi-bin/gitweb.cgi.2 2005-05-29 17:23:10.000000000 +0200 +++ cgi-bin/gitweb.cgi 2005-05-30 21:26:44.000000000 +0200

@@ -1616,7 +1618,7 @@
  		}
  		my @commit_lines = split "\n", $commit_text;
  		my $commit = shift @commit_lines;
-		my %co = git_read_commit($commit, \@commit_lines);
+		%co = git_read_commit($commit, \@commit_lines);
  		if (!%co) {
  			next;
  		}
@@ -1653,7 +1655,6 @@
  	$/ = "\n";
  	open $fd, "-|", "$gitbin/git-rev-list $hash | $gitbin/git-diff-tree 
-r --stdin -S$searchtext";
  	$alternate = 0;
-	my %co;
  	my @files;
  	while (my $line = <$fd>) {
  		if (%co && $line =~ m/^:([0-7]{6}) ([0-7]{6}) ([0-9a-fA-F]{40}) 
([0-9a-fA-F]{40}) (.)\t(.*)$/) {
Next: Kay Sievers
Message 1 of 2 in “Kill warnings in Webserver Error Log”
  1. Kill warnings in Webserver Error LogJochen Roemling, May 30, 2005
  2. Kay SieversMay 31, 2005

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.