From: Timo Hirvonen <tihirvon@gmail.com>
To: git@vger.kernel.org
Cc: Junio C Hamano <junkio@cox.net>
Subject: [PATCH] gitweb: Start search from HEAD
Date: Tue, 20 Jun 2006 15:25:15 +0300 [thread overview]
Message-ID: <20060620152515.23e59396.tihirvon@gmail.com> (raw)
Starting search from whatever the current "h" parameter points to is
wrong. Sometimes it doesn't give all the expected results or may even
fail if h points to an object which is not a commit.
Signed-off-by: Timo Hirvonen <tihirvon@gmail.com>
---
This patch is against the "next" branch.
gitweb/gitweb.cgi | 11 +----------
1 files changed, 1 insertions(+), 10 deletions(-)
diff --git a/gitweb/gitweb.cgi b/gitweb/gitweb.cgi
index 78e6dd0..3ad23a3 100755
--- a/gitweb/gitweb.cgi
+++ b/gitweb/gitweb.cgi
@@ -292,14 +292,7 @@ EOF
if (!defined $searchtext) {
$searchtext = "";
}
- my $search_hash;
- if (defined $hash) {
- $search_hash = $hash;
- } else {
- $search_hash = "HEAD";
- }
$cgi->param("a", "search");
- $cgi->param("h", $search_hash);
print $cgi->startform(-method => "get", -action => $my_uri) .
"<div class=\"search\">\n" .
$cgi->hidden(-name => "p") . "\n" .
@@ -2328,9 +2321,7 @@ sub git_search {
if (!defined $searchtext) {
die_error("", "Text field empty.");
}
- if (!defined $hash) {
- $hash = git_read_head($project);
- }
+ $hash = "HEAD";
my %co = git_read_commit($hash);
if (!%co) {
die_error(undef, "Unknown commit object.");
--
1.4.0.gd281
next reply other threads:[~2006-06-20 12:25 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-06-20 12:25 Timo Hirvonen [this message]
2006-06-20 12:31 ` [PATCH] gitweb: Start search from HEAD Junio C Hamano
2006-06-20 13:41 ` [PATCH] gitweb: Use $hash_base as $search_hash if possible Timo Hirvonen
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=20060620152515.23e59396.tihirvon@gmail.com \
--to=tihirvon@gmail.com \
--cc=git@vger.kernel.org \
--cc=junkio@cox.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).