]> Lady’s Gitweb - Gitweb/commitdiff
gitweb: last-modified time should be commiter, not author
authorGiuseppe Bilotta <redacted>
Mon, 26 Jan 2009 11:50:15 +0000 (12:50 +0100)
committerLady <redacted>
Mon, 6 Apr 2026 04:50:38 +0000 (00:50 -0400)
The last-modified time header added by RSS to increase cache hits from
readers should be set to the date the repository was last modified. The
author time in this respect is not a good guess because the last commit
might come from a oldish patch.

Use the committer time for the last-modified header to ensure a more
correct guess of the last time the repository was modified.

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

index ef5e5dc099765b8a19363377bce6ee8b5ecbf093d8042f0af634861f74362845..f33524d212b7d7db9fc912a85eedb47f807e6b240044c043ad6e301b271268cf 100755 (executable)
@@ -6016,7 +6016,7 @@ sub git_feed {
        }
        if (defined($commitlist[0])) {
                %latest_commit = %{$commitlist[0]};
        }
        if (defined($commitlist[0])) {
                %latest_commit = %{$commitlist[0]};
-               %latest_date   = parse_date($latest_commit{'author_epoch'});
+               %latest_date   = parse_date($latest_commit{'committer_epoch'});
                print $cgi->header(
                        -type => $content_type,
                        -charset => 'utf-8',
                print $cgi->header(
                        -type => $content_type,
                        -charset => 'utf-8',
This page took 0.328727 seconds and 4 git commands to generate.