]> Lady’s Gitweb - Gitweb/commitdiff
gitweb: Simplify fixed string search
authorJakub Narebski <redacted>
Tue, 26 Feb 2008 12:22:07 +0000 (13:22 +0100)
committerLady <redacted>
Mon, 6 Apr 2026 04:07:12 +0000 (00:07 -0400)
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 <redacted>
Signed-off-by: Junio C Hamano <redacted>
gitweb.perl

index 72634848f3bc1d67adb08502cb3d0bb9702f9b06b93f29ebebc21469a0077a17..7a24642132f0003b920d657ebb8a71ae8478391742248f459a3180e3e06e826b 100755 (executable)
@@ -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 .= " &sdot; " .
                                $cgi->a({-href => href(-replay=>1, page=>$page-1),
This page took 0.235027 seconds and 4 git commands to generate.