# [gitweb PATCH] Kill warnings in Webserver Error Log

2 messages from 2005-05-30 to 2005-05-31. Participants: Jochen Roemling, Kay Sievers.
Thread: https://gitlist.dev/t/769

## Jochen Roemling, 2005-05-30 19:34

Subject: [gitweb PATCH] Kill warnings in Webserver Error Log
Message-ID: <429B6AD4.9010107@roemling.net>
URL: https://gitlist.dev/e/429B6AD4.9010107%40roemling.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(.*)$/) {

```

## Kay Sievers, 2005-05-31 09:48

Subject: Re: [gitweb PATCH] Kill warnings in Webserver Error Log
Message-ID: <20050531094838.GA22853@vrfy.org>
URL: https://gitlist.dev/e/20050531094838.GA22853%40vrfy.org
In-Reply-To: <429B6AD4.9010107@roemling.net>

```
On Mon, May 30, 2005 at 09:34:44PM +0200, Jochen Roemling wrote:
> 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.

Dou you get the version from:
  ftp://ehlo.org/gitweb.cgi

It seems already fixed.

Thanks,
Kay

```
