All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] gitweb: Start search from HEAD
@ 2006-06-20 12:25 Timo Hirvonen
  2006-06-20 12:31 ` Junio C Hamano
  0 siblings, 1 reply; 3+ messages in thread
From: Timo Hirvonen @ 2006-06-20 12:25 UTC (permalink / raw)
  To: git; +Cc: Junio C Hamano

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

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2006-06-20 13:41 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-06-20 12:25 [PATCH] gitweb: Start search from HEAD Timo Hirvonen
2006-06-20 12:31 ` Junio C Hamano
2006-06-20 13:41   ` [PATCH] gitweb: Use $hash_base as $search_hash if possible Timo Hirvonen

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.