gitweb: Use $hash_base as $search_hash if possible

$hash (h parameter) does not always point to a commit. Use $hash_base as
$search_hash when it is defined.

Signed-off-by: Timo Hirvonen <tihirvon@gmail.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
This commit is contained in:
Timo Hirvonen 2006-06-20 16:41:05 +03:00 committed by Junio C Hamano
parent 49f582a040
commit 4c5c20261c

View File

@ -322,7 +322,9 @@ EOF
$searchtext = "";
}
my $search_hash;
if (defined $hash) {
if (defined $hash_base) {
$search_hash = $hash_base;
} elsif (defined $hash) {
$search_hash = $hash;
} else {
$search_hash = "HEAD";