]> Lady’s Gitweb - Gitweb/commitdiff
gitweb: Add author and contributor email to Atom feed
authorJakub Narebski <redacted>
Sat, 25 Nov 2006 14:54:33 +0000 (15:54 +0100)
committerLady <redacted>
Mon, 6 Apr 2026 04:07:11 +0000 (00:07 -0400)
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 <redacted>
Signed-off-by: Junio C Hamano <redacted>
gitweb.perl

index 6e727c8b914956005da4a0522f56d49c3bafc952c5633fa2b8f46ab248e2635b..b9d1c09f856ca0d238b6e1a3f18e275b6695cbd21c3b32fcc0aec421bd72a8c2 100755 (executable)
@@ -4324,9 +4324,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" .
This page took 0.2653 seconds and 4 git commands to generate.