]> Lady’s Gitweb - Gitweb/commitdiff
gitweb: feed generator metadata
authorGiuseppe Bilotta <redacted>
Mon, 26 Jan 2009 11:50:12 +0000 (12:50 +0100)
committerLady <redacted>
Mon, 6 Apr 2026 04:50:38 +0000 (00:50 -0400)
Add <generator> tag to RSS and Atom feed. Versioning info (gitweb/git
core versions, separated by a literal slash) is stored in the
appropriate attribute for the Atom feed, and in the tag content for the
RSS feed.

Signed-off-by: Giuseppe Bilotta <redacted>
Signed-off-by: Junio C Hamano <redacted>
gitweb.perl

index 78f54e712ce3f66ad6ebea3a73333aa9ed26495a8111a27f20437fca06992102..566935a6d70ffa66c8ab2ed5b37968818bd6bba2f997792124c7bec6a69a3df4 100755 (executable)
@@ -6086,6 +6086,7 @@ XML
                              "<link>$alt_url</link>\n" .
                              "</image>\n";
                }
+               print "<generator>gitweb v.$version/$git_version</generator>\n";
        } elsif ($format eq 'atom') {
                print <<XML;
 <feed xmlns="http://www.w3.org/2005/Atom">
@@ -6112,6 +6113,7 @@ XML
                } else {
                        print "<updated>$latest_date{'iso-8601'}</updated>\n";
                }
+               print "<generator version='$version/$git_version'>gitweb</generator>\n";
        }
 
        # contents
This page took 0.323028 seconds and 4 git commands to generate.