Commits

Timo Hirvonen  committed 4c5c202

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>

  • Participants
  • Parent commits 49f582a

Comments (0)

Files changed (1)

File gitweb/gitweb.cgi

 			$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";