git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jakub Narebski <jnareb@gmail.com>
To: Robert Fitzsimons <robfitz@273k.net>
Cc: git@vger.kernel.org
Subject: Re: [PATCH 3/3] gitweb: Allow search to be disabled from the config file.
Date: Sat, 23 Dec 2006 14:00:18 +0100	[thread overview]
Message-ID: <200612231400.18774.jnareb@gmail.com> (raw)
In-Reply-To: <20061223122841.GD11474@localhost>

Robert Fitzsimons wrote:
> Jakub Narebski wrote:

>> 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

  reply	other threads:[~2006-12-23 12:57 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-12-23  3:35 [PATCH 1/3] gitweb: Use rev-list pattern search options Robert Fitzsimons
2006-12-23  3:35 ` [PATCH 2/3] gitweb: Require a minimum of two character for the search text Robert Fitzsimons
2006-12-23  3:35   ` [PATCH 3/3] gitweb: Allow search to be disabled from the config file Robert Fitzsimons
2006-12-23  8:20     ` Jakub Narebski
2006-12-23 12:28       ` Robert Fitzsimons
2006-12-23 13:00         ` Jakub Narebski [this message]
2006-12-23 14:57           ` [PATCH] gitweb: Paginate commit/author/committer search output Robert Fitzsimons
2006-12-23 22:43             ` Jakub Narebski
2006-12-23  3:46 ` [PATCH 1/3] gitweb: Use rev-list pattern search options Robert Fitzsimons
2006-12-23  8:21 ` Jakub Narebski

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200612231400.18774.jnareb@gmail.com \
    --to=jnareb@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=robfitz@273k.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).