Re: [PATCHv5 05/12] gitweb: use fullname as hash_base in heads link
- From
Jakub Narebski <jnareb@gmail.com>
- Date
- Sep 26, 2010, 17:57 UTC
- Message-ID
- <201009261957.43923.jnareb@gmail.com>
- In-Reply-To
- <1285344167-8518-6-git-send-email-giuseppe.bilotta@gmail.com>
On Fri, 24 Sep 2010, Giuseppe Bilotta wrote:
> Otherwise, if names are manipulated for display, the link will point to > the wrong head. > > Signed-off-by: Giuseppe Bilotta <giuseppe.bilotta@gmail.com>
Well, of course of 'hash' parameter uses 'fullname' then 'hash_base' also should. Good futureproofing, no argument here. FWIW
Acked-by: Jakub Narebski <jnareb@gmail.com>
Show 17 quoted lines
> ---
> gitweb/gitweb.perl | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl
> index c3ce7a3..e70897e 100755
> --- a/gitweb/gitweb.perl
> +++ b/gitweb/gitweb.perl
> @@ -4977,7 +4977,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>";
> }-- Jakub Narebski Poland