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:

committed by
Junio C Hamano

parent
49f582a040
commit
4c5c20261c
@ -322,7 +322,9 @@ EOF
|
|||||||
$searchtext = "";
|
$searchtext = "";
|
||||||
}
|
}
|
||||||
my $search_hash;
|
my $search_hash;
|
||||||
if (defined $hash) {
|
if (defined $hash_base) {
|
||||||
|
$search_hash = $hash_base;
|
||||||
|
} elsif (defined $hash) {
|
||||||
$search_hash = $hash;
|
$search_hash = $hash;
|
||||||
} else {
|
} else {
|
||||||
$search_hash = "HEAD";
|
$search_hash = "HEAD";
|
||||||
|
Reference in New Issue
Block a user