Re: [PATCH] gitweb: make feature_blame return a list

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

> Matt Kraai <kraai@xxxxxxxxx> 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@xxxxxxxxx>
>> ---
>>  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

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux