Code

gitweb: use fullname as hash_base in heads link
authorGiuseppe Bilotta <giuseppe.bilotta@gmail.com>
Thu, 11 Nov 2010 12:26:08 +0000 (13:26 +0100)
committerJunio C Hamano <gitster@pobox.com>
Wed, 17 Nov 2010 21:02:17 +0000 (13:02 -0800)
Otherwise, if names are manipulated for display, the link will point to
the wrong head.

Signed-off-by: Giuseppe Bilotta <giuseppe.bilotta@gmail.com>
Acked-by: Jakub Narebski <jnareb@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
gitweb/gitweb.perl

index 253f41adc9e64105bf9d1642102b20bba6bc5f20..77693abb2ae2ab1f7fcf7988ce2e2cde7fb3e221 100755 (executable)
@@ -4960,7 +4960,7 @@ sub git_heads_body {
                      "<td class=\"link\">" .
                      $cgi->a({-href => href(action=>"shortlog", hash=>$ref{'fullname'})}, "shortlog") . " | " .
                      $cgi->a({-href => href(action=>"log", hash=>$ref{'fullname'})}, "log") . " | " .
-                     $cgi->a({-href => href(action=>"tree", hash=>$ref{'fullname'}, hash_base=>$ref{'name'})}, "tree") .
+                     $cgi->a({-href => href(action=>"tree", hash=>$ref{'fullname'}, hash_base=>$ref{'fullname'})}, "tree") .
                      "</td>\n" .
                      "</tr>";
        }