git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Giuseppe Bilotta <giuseppe.bilotta@gmail.com>
To: git@vger.kernel.org
Subject: Re: [PATCH] gitweb: make feature_blame return a list
Date: Mon, 15 Dec 2008 23:52:38 +0100	[thread overview]
Message-ID: <gi6n3m$kvc$1@ger.gmane.org> (raw)
In-Reply-To: 7v7i61w06k.fsf@gitster.siamese.dyndns.org

On Monday 15 December 2008 23:20, Junio C Hamano wrote:

> Matt Kraai <kraai@ftbfs.org> writes:
> 
>> The feature defaults are expected to be a list, but feature_blame was
>> returning a scalar.  This change makes it consistent with the other
>> boolean feature subroutines.
>>
>> Signed-off-by: Matt Kraai <kraai@ftbfs.org>
>> ---
>>  gitweb/gitweb.perl |    6 +++---
>>  1 files changed, 3 insertions(+), 3 deletions(-)
>>
>> diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl
>> index 6eb370d..145e712 100755
>> --- a/gitweb/gitweb.perl
>> +++ b/gitweb/gitweb.perl
>> @@ -367,12 +367,12 @@ sub feature_blame {
>>      my ($val) = git_get_project_config('blame', '--bool');
>>  
>>      if ($val eq 'true') {
>> -            return 1;
>> +            return (1);
>>      } elsif ($val eq 'false') {
>> -            return 0;
>> +            return (0);
>>      }
>>  
>> -    return $_[0];
>> +    return ($_[0]);
>>  }
> 
> My Perl may be getting rusty, but does the above make any difference?
> How?

It's formally more correct and makes the blame feature fit with the
general feature framework, although the feature works correctly even
without the (). I was actually going to send a similar patch myself, 
having missed it during the cleanup and get/check splitup patchset.

Matt's patch gets my Ack, for what it's worth.


-- 
Giuseppe "Oblomov" Bilotta

  reply	other threads:[~2008-12-15 22:54 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-12-15 14:51 [PATCH] gitweb: make feature_blame return a list Matt Kraai
2008-12-15 14:51 ` [PATCH] gitweb: unify boolean feature subroutines Matt Kraai
2008-12-15 22:21   ` Junio C Hamano
2008-12-15 22:20 ` [PATCH] gitweb: make feature_blame return a list Junio C Hamano
2008-12-15 22:52   ` Giuseppe Bilotta [this message]
2008-12-16  2:46   ` Matt Kraai
2008-12-16  5:38     ` Junio C Hamano
2008-12-16  6:16       ` [PATCH] gitweb: unify boolean feature subroutines Matt Kraai
2008-12-16  7:36         ` [PATCH] gitweb: pass the option name to the feature callback Matt Kraai
2008-12-16  9:03         ` [PATCH] gitweb: unify boolean feature subroutines Junio C Hamano
2008-12-16 14:23           ` Matt Kraai
2008-12-17  8:10             ` Petr Baudis
2008-12-17  8:20               ` Junio C Hamano

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='gi6n3m$kvc$1@ger.gmane.org' \
    --to=giuseppe.bilotta@gmail.com \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
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;
as well as URLs for NNTP newsgroup(s).