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

2013-12-05 Thread Krzesimir Nowak
On Wed, 2013-12-04 at 17:07 +0100, Jakub Narębski wrote: On Wed, Dec 4, 2013 at 2:43 PM, Krzesimir Nowak krzesi...@endocode.com wrote: Users of validate_* passing 0 might get failures on correct name because of coercion of 0 to false in code like: die_error(500, invalid ref) unless

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

2013-12-05 Thread Junio C Hamano
Krzesimir Nowak krzesi...@endocode.com 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

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

2013-12-05 Thread Jakub Narębski
On Thu, Dec 5, 2013 at 7:16 PM, Junio C Hamano gits...@pobox.com wrote: Krzesimir Nowak krzesi...@endocode.com writes: On Wed, 2013-12-04 at 17:07 +0100, Jakub Narębski wrote: The only change that needs to be done is replacing return $input; with return 1; I

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

2013-12-05 Thread Junio C Hamano
Jakub Narębski jna...@gmail.com writes: But I am not against return 0; on validation error (would putting it in separate patch make review easier, or just pointlessly proliferate patches?). OK. -- To unsubscribe from this list: send the line unsubscribe git in the body of a message to

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

2013-12-04 Thread Krzesimir Nowak
Users of validate_* passing 0 might get failures on correct name because of coercion of 0 to false in code like: die_error(500, invalid ref) unless (check_ref_format (0)); Signed-off-by: Krzesimir Nowak krzesi...@endocode.com --- gitweb/gitweb.perl | 45

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

2013-12-04 Thread Junio C Hamano
Jakub Narębski jna...@gmail.com writes: On Wed, Dec 4, 2013 at 2:43 PM, Krzesimir Nowak krzesi...@endocode.com wrote: Users of validate_* passing 0 might get failures on correct name because of coercion of 0 to false in code like: die_error(500, invalid ref) unless (check_ref_format (0));