Skip to content

Commit

Permalink
gitweb: Use $hash_base as $search_hash if possible
Browse files Browse the repository at this point in the history
$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>
  • Loading branch information
Timo Hirvonen authored and Junio C Hamano committed Jun 22, 2006
1 parent 49f582a commit 4c5c202
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion gitweb/gitweb.cgi
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down

0 comments on commit 4c5c202

Please sign in to comment.