From: Bernhard R. Link Date: Wed, 01 Feb 2012 16:59:02 GMT Subject: Re: [PATCH v5 2/5] gitweb: add project_filter to limit project list to a subdirectory Message-ID: <20120201165902.GA14706@server.brlink.eu> In-Reply-To: <7v39axaq0v.fsf@alter.siamese.dyndns.org> * Junio C Hamano [120130 21:34]: > Thanks; I'll queue them in 'pu' for now (if Jakub wants to Ack the pieces, > I'll amend them). > > Regarding the first patch in the series, while it may be a valid perl to > introduce a new variable, assign to it and then munge its contents with > s///, all inside a parameter list of a function call, it is doing a bit > too much and makes it hard to see if the variable may or may not later be > used in the same scope (in this case, it is not). > > I am tempted to squash the following in. Look liks a change like that is actually needed. I made the mistake of assuming (my $filter = $project) =~ s/\.git$//; was the same like $project =~ s/\.git$//r; but the latter returns the changed string, the former returns the number of arguments. (So it looks for forks in a directory named '1'). (Should have tested it again after this last change)... Can you squash it in (with the correction of Jakub Narebski), or do you prefer a new patch? Bernhard R. Link