GitWeb and atom feed links
- From
- Heiko W. Rupp <hwr@pilhuhn.de>
- Date
- Feb 13, 2012, 20:43 UTC
- Message-ID
- <F3741779-8DDA-4275-BB68-24D02297C702@pilhuhn.de>
Hi,
( got this email from Junio )
when you e.g. look at http://git.kernel.org/?p=git/git.git;a=summary and then the lower right, there are two buttons for feeds. If you click on e.g. atom, you end up with an url of http://git.kernel.org/?p=git/git.git;a=atom where the output is not a feed in atom format, but plain html with tables etc.
If you change the url to http://git.kernel.org/?p=git/git.git&a=atom
the output is a correct atom feed (same for rss).
I've traced it down in my copy of gitweb to
sub git_footer_html {
...
$href_params{'action'} = lc($format);
print $cgi->a({-href => href(%href_params),
-title => "$href_params{'-title'} $format feed",
-class => $feed_class}, $format)."\n";and here to the usage of href()
Locally I've modified that to
$href_params{'action'} = lc($format);
my $hr = "?p=$project&a=";
$hr .= lc($format);
print $cgi->a({-href => $hr,
-title => "$href_params{'-title'} $format feed",
-class => $feed_class}, $format)."\n";and it works.
Attached is a patch against current master that reflects above change
Heiko
-- Heiko Rupp hwr@pilhuhn.de Blog: http://javablogs.com/ViewBlog.action?id=14468