@matheusbsbs / matheus-bagliano / commits / 91fd2bf3fd
Fork 0

gitweb: Use author_epoch for pubdate in gitweb feeds

Use creation date (author_epoch) instead of former commit date (committer_epoch) as publish date in gitweb feeds (RSS, Atom). Signed-off-by: Jakub Narebski <jnareb@gmail.com> Signed-off-by: Junio C Hamano <junkio@cox.net>

Jakub Narebski committed Nov 25, 2006 at 15:54 UTC 91fd2bf3fdc72351532a8fd74cdd0da37b036ed1
1 file changed +3 -3
gitweb/gitweb.perl
+3 -3
@@ -4201,7 +4201,7 @@ sub git_feed {
4201 }
4202 if (defined($revlist[0])) {
4203 %latest_commit = parse_commit($revlist[0]);
4204 - %latest_date = parse_date($latest_commit{'committer_epoch'});
4204 + %latest_date = parse_date($latest_commit{'author_epoch'});
4205 print $cgi->header(
4206 -type => $content_type,
4207 -charset => 'utf-8',
@@ -4294,10 +4294,10 @@ XML
4294 my $commit = $revlist[$i];
4295 my %co = parse_commit($commit);
4296 # we read 150, we always show 30 and the ones more recent than 48 hours
4297 - if (($i >= 20) && ((time - $co{'committer_epoch'}) > 48*60*60)) {
4297 + if (($i >= 20) && ((time - $co{'author_epoch'}) > 48*60*60)) {
4298 last;
4299 }
4300 - my %cd = parse_date($co{'committer_epoch'});
4300 + my %cd = parse_date($co{'author_epoch'});
4301
4302 # get list of changed files
4303 open $fd, "-|", git_cmd(), "diff-tree", '-r', @diff_opts,