Subject: Re: [PATCH (for maint)] gitweb: Fix fixed string (non-regexp) project search

From: Jakub Narebski <[email-masked]>
Date: Mon, 5 Mar 2012 09:59:47 +0100

Junio C Hamano wrote:
> Jakub Narebski <[email-masked]> writes:
> 
> > And here is the patch for maint
> > -->8-- -------------------------------------------------------- -->8--
> > Subject: gitweb: Fix fixed string (non-regexp) project search
> >
> > Use $search_regexp, where regex metacharacters are quoted, for
> > searching projects list, rather than $searchtext, which contains
> > original search term.
> >
> > Reported-by: Ramsay Jones <[email-masked]>
> > Signed-off-by: Jakub Narebski <[email-masked]>
> > ---
> >  gitweb/gitweb.perl |   20 +++++++++++---------
> >  1 files changed, 11 insertions(+), 9 deletions(-)
> >
> > diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl
> > index d5dbd64..e248792 100755
> > --- a/gitweb/gitweb.perl
> > +++ b/gitweb/gitweb.perl
> > @@ -5290,9 +5290,11 @@ sub git_project_list_body {
> >  	@projects = fill_project_list_info(\@projects);
> >  	# searching projects require filling to be run before it
> >  	@projects = search_projects_list(\@projects,
> > -	                                 'searchtext' => $searchtext,
> > -	                                 'tagfilter'  => $tagfilter)
> > -		if ($tagfilter || $searchtext);
> > +	                                 'search_regexp' => $search_regexp,
> > +	                                 'tagfilter' => $tagfilter)
> > +		if ($tagfilter || $search_regexp);
> > +	# fill the rest
> > +	@projects = fill_project_list_info(\@projects);
> 
> Hmph, didn't you already call fill_project_list_info(\@projects) before
> search_projects_list() already?

True.  Sorry about that. 

Can you fix that, or should I resend?

-- 
Jakub Narebski
Poland