Skip to content

Commit

Permalink
gitweb: Use author_epoch for pubdate in gitweb feeds
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Jakub Narebski authored and Junio C Hamano committed Nov 25, 2006
1 parent ab23c19 commit 91fd2bf
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions gitweb/gitweb.perl
Original file line number Diff line number Diff line change
Expand Up @@ -4201,7 +4201,7 @@ sub git_feed {
}
if (defined($revlist[0])) {
%latest_commit = parse_commit($revlist[0]);
%latest_date = parse_date($latest_commit{'committer_epoch'});
%latest_date = parse_date($latest_commit{'author_epoch'});
print $cgi->header(
-type => $content_type,
-charset => 'utf-8',
Expand Down Expand Up @@ -4294,10 +4294,10 @@ sub git_feed {
my $commit = $revlist[$i];
my %co = parse_commit($commit);
# we read 150, we always show 30 and the ones more recent than 48 hours
if (($i >= 20) && ((time - $co{'committer_epoch'}) > 48*60*60)) {
if (($i >= 20) && ((time - $co{'author_epoch'}) > 48*60*60)) {
last;
}
my %cd = parse_date($co{'committer_epoch'});
my %cd = parse_date($co{'author_epoch'});

# get list of changed files
open $fd, "-|", git_cmd(), "diff-tree", '-r', @diff_opts,
Expand Down

0 comments on commit 91fd2bf

Please sign in to comment.