public inbox for git@vger.kernel.org 
 help / color / mirror / Atom feed
From: Jakub Narebski <jnareb@gmail•com>
To: Joey Hess <joey@kitenet•net>
Cc: git@vger•kernel.org
Subject: Re: [PATCH] avoid gitweb uninitialized value warning
Date: Thu, 18 Sep 2008 08:13:35 -0700 (PDT)	[thread overview]
Message-ID: <m3abe5mqs8.fsf@localhost.localdomain> (raw)
In-Reply-To: <20080905182629.GA22030@kodama.kitenet.net>

Joey Hess <joey@kitenet•net> writes:
> Subject: [PATCH] avoid gitweb uninitialized value warning

I would say _where_ this uninitialized value warning was, e.g.

Subject: [PATCH] gitweb: avoid warnings for commits with no body

>
> In the ususual case when there is no commit message, gitweb would
> output an uninitialized value warning.

Typo: s/ususual/unusual/

> 
> Signed-off-by: Joey Hess <joey@kitenet•net>

Acked-by: Jakub Narebski <jnareb@gmail•com>

> ---
>  gitweb/gitweb.perl |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl
> index 29e2156..da474d0 100755
> --- a/gitweb/gitweb.perl
> +++ b/gitweb/gitweb.perl
> @@ -2123,7 +2123,7 @@ sub parse_commit_text {
>  			last;
>  		}
>  	}
> -	if ($co{'title'} eq "") {
> +	if (! defined $co{'title'} || $co{'title'} eq "") {

I would avoid space between logical negation operator '!' and
its operand, i.e. I would write:

+	if (!defined $co{'title'} || $co{'title'} eq "") {

>  		$co{'title'} = $co{'title_short'} = '(no commit message)';
>  	}
>  	# remove added spaces
> -- 
> 1.5.6.5
> 
> -- 
> see shy jo

-- 
Jakub Narebski
Poland
ShadeHawk on #git

      reply	other threads:[~2008-09-18 15:14 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-09-05 18:26 [PATCH] avoid gitweb uninitialized value warning Joey Hess
2008-09-18 15:13 ` Jakub Narebski [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m3abe5mqs8.fsf@localhost.localdomain \
    --to=jnareb@gmail$(echo .)com \
    --cc=git@vger$(echo .)kernel.org \
    --cc=joey@kitenet$(echo .)net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox