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

[PATCH 2/3] gitweb: Add author and contributor email to Atom feed

From
Jakub Narebski <jnareb@gmail.com>
Date
Nov 25, 2006, 14:54 UTC
Message-ID
<11644665113030-git-send-email-jnareb@gmail.com>
In-Reply-To
<11644664743455-git-send-email-jnareb@gmail.com>

Add author email (from 'author_email') and contributor email (from 'committer_email') to items in the Atom format gitweb feed.

Signed-off-by: Jakub Narebski <jnareb@gmail.com>
---
 gitweb/gitweb.perl |   14 ++++++++++++--
 1 files changed, 12 insertions(+), 2 deletions(-)
diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl
index 2ebd9d7..15dd1f4 100755
--- a/gitweb/gitweb.perl
+++ b/gitweb/gitweb.perl
@@ -4323,9 +4323,19 @@ XML
 			print "<entry>\n" .
 			      "<title type=\"html\">" . esc_html($co{'title'}) . "</title>\n" .
 			      "<updated>$cd{'iso-8601'}</updated>\n" .
-			      "<author><name>" . esc_html($co{'author_name'}) . "</name></author>\n" .
+			      "<author>\n" .
+			      "  <name>" . esc_html($co{'author_name'}) . "</name>\n";
+			if ($co{'author_email'}) {
+				print "  <email>" . esc_html($co{'author_email'}) . "</email>\n";
+			}
+			print "</author>\n" .
 			      # use committer for contributor
-			      "<contributor><name>" . esc_html($co{'committer_name'}) . "</name></contributor>\n" .
+			      "<contributor>\n" .
+			      "  <name>" . esc_html($co{'committer_name'}) . "</name>\n";
+			if ($co{'committer_email'}) {
+				print "  <email>" . esc_html($co{'committer_email'}) . "</email>\n";
+			}
+			print "</contributor>\n" .
 			      "<published>$cd{'iso-8601'}</published>\n" .
 			      "<link rel=\"alternate\" type=\"text/html\" href=\"$co_url\" />\n" .
 			      "<id>$co_url</id>\n" .
-- 
1.4.4.1
Previous: Jakub NarebskiNext: Jakub Narebski
Message 2 of 3 in “gitweb: Add author and committer email extraction to parse_commit”
  1. 1/3 gitweb: Add author and committer email extraction to parse_commitJakub Narebski, Nov 25, 2006
  2. 2/3 gitweb: Add author and contributor email to Atom feedJakub Narebski, Nov 25, 2006
  3. 3/3 gitweb: Use author_epoch for pubdate in gitweb feedsJakub Narebski, Nov 25, 2006

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.