git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH 3/3] gitweb: Allow search to be disabled from the config file.

From
Jakub Narebski <jnareb@gmail.com>
Date
Dec 23, 2006, 13:00 UTC
Message-ID
<200612231400.18774.jnareb@gmail.com>
In-Reply-To
<20061223122841.GD11474@localhost>
Robert Fitzsimons wrote:
> Jakub Narebski wrote:
Show 7 quoted lines
>> I'm not sure if it is worth disabling such not demanding in resources
>> (contrary to pickaxe, blame and to some extent snapshot). Perhaps it would
>> be better to simply paginate search result, like "history" view got
>> paginated?
> 
> Yes that makes sense.  I'll withdraw this patch and try and come up with
> a new one which can paginate search results.

Besides having removed search, it would follow removing search _form_. Hmmm... perhaps we should add 'pickaxe' to search form only if it is enabled?

Something like (warning: this diff is certainly whitespace damaged!):
diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl
index 5feebaf..585d9fd 100755
--- a/gitweb/gitweb.perl
+++ b/gitweb/gitweb.perl
@@ -1894,7 +1903,8 @@ EOF
                      $cgi->hidden(-name => "a") . "\n" .
                      $cgi->hidden(-name => "h") . "\n" .
                      $cgi->popup_menu(-name => 'st', -default => 'commit',
-                                      -values => ['commit', 'author', 'committer', 'pickaxe
+                                      -values => ['commit', 'author', 'committer',
+                                      gitweb_check_feature('pickaxe') ? 'pickaxe' : ()]) .
                      $cgi->sup($cgi->a({-href => href(action=>"search_help")}, "?")) .
                      " search:\n",
                      $cgi->textfield(-name => "s", -value => $searchtext) . "\n" .



Take a look how it was done for "history" view in commit 8be683520e
  "gitweb: Paginate history output"

Although with search you have additional complication with marking match,
and "log" view like rather than "shortlog" like view... so I'm not sure
if it would truly help. On the other hand you can use --skip option you
have introduced...
-- 
Jakub Narebski
Poland
Previous: Robert FitzsimonsNext: Robert Fitzsimons
Message 6 of 10 in “gitweb: Use rev-list pattern search options.”
  1. 1/3 gitweb: Use rev-list pattern search options.Robert Fitzsimons, Dec 23, 2006
  2. 2/3 gitweb: Require a minimum of two character for the search text.Robert Fitzsimons, Dec 23, 2006
  3. 3/3 gitweb: Allow search to be disabled from the config file.Robert Fitzsimons, Dec 23, 2006
  4. Jakub NarebskiDec 23, 2006
  5. Robert FitzsimonsDec 23, 2006
  6. Jakub NarebskiDec 23, 2006
  7. gitweb: Paginate commit/author/committer search outputRobert Fitzsimons, Dec 23, 2006
  8. Jakub NarebskiDec 23, 2006
  9. Robert FitzsimonsDec 23, 2006
  10. Jakub NarebskiDec 23, 2006

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.