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

Re: [PATCH] Prevent warning

From
Torsten Bögershausen <tboegi@web.de>
Date
Oct 29, 2018, 15:54 UTC
Message-ID
<20181029155453.GA9819@tor.lan>
In-Reply-To
<01020166c07adf27-0c2cb5ac-2292-4ce3-808e-b627202fd45f-000000@eu-west-1.amazonses.com>

Thanks for the patch. Could you please sign it off ? The other remark would be if the header line could be written longer than just "Prevent warning". to give people digging into the Git history an initial information, where the warning occured and from which module it was caused. May be something like this as a head line ?

gitweb.perl: Fix Odd number of elements warning
On Mon, Oct 29, 2018 at 03:39:30PM +0000, Pete wrote:
Show 22 quoted lines
> Prevent the following warning in the web server error log:
> gitweb.cgi: Odd number of elements in anonymous hash at /usr/share/gitweb/gitweb.cgi line 3305
> ---
>  gitweb/gitweb.perl | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl
> index 2594a4badb3d7..200647b683225 100755
> --- a/gitweb/gitweb.perl
> +++ b/gitweb/gitweb.perl
> @@ -3302,7 +3302,7 @@ sub git_get_remotes_list {
>  		next if $wanted and not $remote eq $wanted;
>  		my ($url, $key) = ($1, $2);
>  
> -		$remotes{$remote} ||= { 'heads' => () };
> +		$remotes{$remote} ||= { 'heads' => [] };
>  		$remotes{$remote}{$key} = $url;
>  	}
>  	close $fd or return;
> 
> --
> https://github.com/git/git/pull/548
Previous: PeteNext: Jeff King
Message 2 of 3 in “Prevent warning”
  1. Prevent warningPete, Oct 29, 2018
  2. Torsten BögershausenOct 29, 2018
  3. Jeff KingOct 29, 2018

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.