]> Lady’s Gitweb - Gitweb/blobdiff - gitweb.perl
gitweb: clarify search results page when no matching commit found
[Gitweb] / gitweb.perl
index 8936b0ef21da989a5f02e4b78cb40665d4a2248aeed600d00079b90d22ce017a..f3d8ad86288935dce883c19877f48879022bc01797af0a35e9dfafb72f94b540 100755 (executable)
@@ -1126,7 +1126,7 @@ sub run {
 
                run_request();
 
-               $pre_dispatch_hook->()
+               $post_dispatch_hook->()
                        if $post_dispatch_hook;
 
                last REQUEST if ($is_last_request->());
@@ -6522,12 +6522,13 @@ sub git_search {
                        $paging_nav .= " ⋅ next";
                }
 
-               if ($#commitlist >= 100) {
-               }
-
                git_print_page_nav('','', $hash,$co{'tree'},$hash, $paging_nav);
                git_print_header_div('commit', esc_html($co{'title'}), $hash);
-               git_search_grep_body(\@commitlist, 0, 99, $next_link);
+               if ($page == 0 && !@commitlist) {
+                       print "<p>No match.</p>\n";
+               } else {
+                       git_search_grep_body(\@commitlist, 0, 99, $next_link);
+               }
        }
 
        if ($searchtype eq 'pickaxe') {
This page took 0.243223 seconds and 4 git commands to generate.