aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKay Sievers <kay.sievers@suse.de>2005-09-17 03:00:21 +0200
committerKay Sievers <kay.sievers@suse.de>2005-09-17 03:00:21 +0200
commitc39e47d98a05beb6f5194900b1b081ccc00d70e7 (patch)
treef5bc39f88b60c9aa212a9540b388da8a2451e9b9
parentbd4d3c92d7bbe527bfc24e1a0bc4aa42900e4c90 (diff)
downloadgit-c39e47d98a05beb6f5194900b1b081ccc00d70e7.tar.gz
git-c39e47d98a05beb6f5194900b1b081ccc00d70e7.tar.xz
start searching at the current $hash value
Signed-off-by: Kay Sievers <kay.sievers@suse.de>
-rwxr-xr-xgitweb.cgi8
1 files changed, 8 insertions, 0 deletions
diff --git a/gitweb.cgi b/gitweb.cgi
index 68d4bc389..3a89d826e 100755
--- a/gitweb.cgi
+++ b/gitweb.cgi
@@ -297,11 +297,19 @@ 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" .
$cgi->hidden(-name => "a") . "\n" .
+ $cgi->hidden(-name => "h") . "\n" .
$cgi->textfield(-name => "s", -value => $searchtext) . "\n" .
"</div>" .
$cgi->end_form() . "\n";