From: Junio C Hamano Date: Sun, 17 Sep 2006 21:45:32 GMT Subject: Re: [PATCH] gitweb fix validating pg (page) parameter Message-ID: <7v8xki2mmb.fsf@assigned-by-dhcp.cox.net> In-Reply-To: <20060917213838.GA12782@moooo.ath.cx> Matthias Lederhofer writes: >> > + if ($page =~ m/[^0-9]/) { >... > The first page seems to have number 0. After removing the 1 <= $page > this code should do the same as my patch, apply whatever you think is > easier to read (I prefer if over unless most of the time). Ah, I did not notice we call the first page 0; barfing on any non-digit in the string like you do sounds quite sane. Thanks.