Subject: Re: [PATCH 3/5] gitweb: Return plain booleans in validation methods

From: Junio C Hamano <[email-masked]>
Date: Thu, 05 Dec 2013 10:16:10 -0800

Krzesimir Nowak <[email-masked]> writes:

> On Wed, 2013-12-04 at 17:07 +0100, Jakub Narębski wrote:
>> The only change that needs to be doe is replacing
>> 
>>            return $input;
>> 
>> with
>> 
>>            return 1;
>> 
>
> I prefer to use zeros instead of undefs - one might wonder if that undef
> is somewhat special that we can't use 0.

For Perl speakers, I suspect the code gives a totally opposite
impression.  Normal "false" return from a sub, when there is no
special need, is to return an undef from it, and a "return 0" would
make the readers wonder if there is something special about the way
the returned value has to be numeric zero, no?