Message ID | CALRJROB7gGWok-YPGTjPe+TXkU5Y_MhqcPSiCGoPDzJ=WGHoKA@mail.gmail.com (mailing list archive) |
---|---|
State | Superseded |
Headers | show |
Series | [v2] gitweb: rss/atom change published/updated date to committer date | expand |
Ariel Cabello Mateos <080ariel@gmail.com> writes: > Currently the value used is the author date. Change it to the > committer date that betters reflect the "published/updated" definition > and makes rss/atom feeds more linear. Gitlab/Github rss/atom feeds use > the committer date. > > The committer date is already used to determine if more items should be fetched. > > Signed-off-by: Jesús Ariel Cabello Mateos <080ariel@gmail.com> > --- > Changes since v1: > - Typo fix in the commit message. > - Semantic fixes in the commit message. error: corrupt patch at line 20 > diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl > index ccd14e0e30..0ef5707557 100755 > --- a/gitweb/gitweb.perl > +++ b/gitweb/gitweb.perl > @@ -8329,7 +8329,7 @@ sub git_feed { > if (($i >= 20) && ((time - $co{'author_epoch'}) > 48*60*60)) { > last; > } > - my %cd = parse_date($co{'author_epoch'} > , $co{'author_tz'}); > + my %cd = parse_date($co{'committer_epoch'}, > $co{'committer_tz'}); > > # get list of changed files > open my $fd, "-|", git_cmd(), "diff-tree", '-r', @diff_opts,
Junio C Hamano <gitster@pobox.com> writes: > Ariel Cabello Mateos <080ariel@gmail.com> writes: > >> Currently the value used is the author date. Change it to the It is left unsaid what "the value" is used for. Let's rewrite the first sentence like so: The author date is used for published/updated date in the rss/atom feed stream. Change it to ... Another thing that is curious is why the mention of author_epoch is left as is before the hunk. Shouldn't we use the same committer time for loop cut-off and also for display? diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl index e66eb3d9ba..c1151544cc 100755 --- a/gitweb/gitweb.perl +++ b/gitweb/gitweb.perl @@ -8324,10 +8324,10 @@ sub git_feed { my %co = %{$commitlist[$i]}; my $commit = $co{'id'}; # we read 150, we always show 30 and the ones more recent than 48 hours - if (($i >= 20) && ((time - $co{'author_epoch'}) > 48*60*60)) { + if (($i >= 20) && ((time - $co{'committer_epoch'}) > 48*60*60)) { last; } - my %cd = parse_date($co{'author_epoch'}, $co{'author_tz'}); + my %cd = parse_date($co{'committer_epoch'}, $co{'committer_tz'}); # get list of changed files open my $fd, "-|", git_cmd(), "diff-tree", '-r', @diff_opts,
diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl index ccd14e0e30..0ef5707557 100755 --- a/gitweb/gitweb.perl +++ b/gitweb/gitweb.perl @@ -8329,7 +8329,7 @@ sub git_feed { if (($i >= 20) && ((time - $co{'author_epoch'}) > 48*60*60)) { last; } - my %cd = parse_date($co{'author_epoch'} , $co{'author_tz'}); + my %cd = parse_date($co{'committer_epoch'}, $co{'committer_tz'});