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 <jnareb@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:

committed by
Junio C Hamano

parent
311e552e76
commit
0270cd0eea
@ -5254,14 +5254,16 @@ sub git_search {
|
|||||||
} elsif ($searchtype eq 'committer') {
|
} elsif ($searchtype eq 'committer') {
|
||||||
$greptype = "--committer=";
|
$greptype = "--committer=";
|
||||||
}
|
}
|
||||||
$greptype .= $search_regexp;
|
$greptype .= $searchtext;
|
||||||
my @commitlist = parse_commits($hash, 101, (100 * $page), undef, $greptype);
|
my @commitlist = parse_commits($hash, 101, (100 * $page), undef,
|
||||||
|
$greptype, '--fixed-strings');
|
||||||
|
|
||||||
my $paging_nav = '';
|
my $paging_nav = '';
|
||||||
if ($page > 0) {
|
if ($page > 0) {
|
||||||
$paging_nav .=
|
$paging_nav .=
|
||||||
$cgi->a({-href => href(action=>"search", hash=>$hash,
|
$cgi->a({-href => href(action=>"search", hash=>$hash,
|
||||||
searchtext=>$searchtext, searchtype=>$searchtype)},
|
searchtext=>$searchtext,
|
||||||
|
searchtype=>$searchtype)},
|
||||||
"first");
|
"first");
|
||||||
$paging_nav .= " ⋅ " .
|
$paging_nav .= " ⋅ " .
|
||||||
$cgi->a({-href => href(-replay=>1, page=>$page-1),
|
$cgi->a({-href => href(-replay=>1, page=>$page-1),
|
||||||
|
Reference in New Issue
Block a user