mirror of
https://github.com/git/git
synced 2024-08-27 03:29:21 +00:00
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:
parent
49f582a040
commit
4c5c20261c
|
@ -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";
|
||||
|
|
Loading…
Reference in a new issue