@matheusbsbs / matheus-bagliano / commits / 4c5c20261c
Fork 0

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>

Timo Hirvonen committed Jun 20, 2006 at 16:41 UTC 4c5c20261c5403650a31a91ebce0cc9444182383
1 file changed +3 -1
gitweb/gitweb.cgi
+3 -1
@@ -322,7 +322,9 @@ EOF
322 $searchtext = "";
323 }
324 my $search_hash;
325 - if (defined $hash) {
325 + if (defined $hash_base) {
326 + $search_hash = $hash_base;
327 + } elsif (defined $hash) {
328 $search_hash = $hash;
329 } else {
330 $search_hash = "HEAD";