git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH] Advertise per branch RSS/Atom feeds

From
Junio C Hamano <gitster@pobox.com>
Date
Aug 11, 2007, 09:41 UTC
Message-ID
<7vps1ummqy.fsf@assigned-by-dhcp.cox.net>

The feeder code had provisions to accept 'h' parameter to specify which branch to send the feed data from, but there was no link that advertised this capability on the pages.

This adds h parameter to the footer of shortlog/log page for the branch.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
---
 gitweb/gitweb.perl |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl
index f282a67..6c1da14 100755
--- a/gitweb/gitweb.perl
+++ b/gitweb/gitweb.perl
@@ -2378,12 +2378,16 @@ sub git_footer_html {
 	print "<div class=\"page_footer\">\n";
 	if (defined $project) {
 		my $descr = git_get_project_description($project);
+		my @tips = ();
+		if ($hash !~ /^[0-9a-fA-F]{40}$/) {
+			@tips = (hash => $hash);
+		}
 		if (defined $descr) {
 			print "<div class=\"page_footer_text\">" . esc_html($descr) . "</div>\n";
 		}
-		print $cgi->a({-href => href(action=>"rss"),
+		print $cgi->a({-href => href(action=>"rss", @tips),
 		              -class => "rss_logo"}, "RSS") . " ";
-		print $cgi->a({-href => href(action=>"atom"),
+		print $cgi->a({-href => href(action=>"atom", @tips),
 		              -class => "rss_logo"}, "Atom") . "\n";
 	} else {
 		print $cgi->a({-href => href(project=>undef, action=>"opml"),
Next: Jakub Narebski
Message 1 of 2 in “Advertise per branch RSS/Atom feeds”
  1. Advertise per branch RSS/Atom feedsJunio C Hamano, Aug 11, 2007
  2. Jakub NarebskiAug 11, 2007

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.