From: Jakub Narebski Date: Tue, 26 Feb 2008 12:22:07 +0000 (+0100) Subject: gitweb: Simplify fixed string search X-Git-Url: https://git.ladys.computer/Gitweb/commitdiff_plain/719667433be034caa68c45ce6163b82d2baa1d16ea390069a11205d3803bb083 gitweb: Simplify fixed string search Use '--fixed-strings' option to git-rev-list to simplify and improve searching commit messages (commit search). It allows to search for example for "don't" successfully from gitweb. Signed-off-by: Jakub Narebski Signed-off-by: Junio C Hamano --- diff --git a/gitweb.perl b/gitweb.perl index 7263484..7a24642 100755 --- a/gitweb.perl +++ b/gitweb.perl @@ -5255,14 +5255,16 @@ sub git_search { } elsif ($searchtype eq 'committer') { $greptype = "--committer="; } - $greptype .= $search_regexp; - my @commitlist = parse_commits($hash, 101, (100 * $page), undef, $greptype); + $greptype .= $searchtext; + my @commitlist = parse_commits($hash, 101, (100 * $page), undef, + $greptype, '--fixed-strings'); my $paging_nav = ''; if ($page > 0) { $paging_nav .= $cgi->a({-href => href(action=>"search", hash=>$hash, - searchtext=>$searchtext, searchtype=>$searchtype)}, + searchtext=>$searchtext, + searchtype=>$searchtype)}, "first"); $paging_nav .= " ⋅ " . $cgi->a({-href => href(-replay=>1, page=>$page-1),