[PATCH v2] gitweb: rss/atom change published/updated date to committer date

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxx>
---
Changes since v1:
- Typo fix in the commit message.
- Semantic fixes in the commit message.

Thank you, Junio!

 gitweb/gitweb.perl | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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,
--
2.45.2

On Thu, Jul 4, 2024 at 4:46 PM Jesús Ariel Cabello Mateos
<080ariel@xxxxxxxxx> wrote:
>
> Currently the published(in rss) and the updated(in atom) date
> used is the authored date. Change it to the committed date
> that betters reflect the "published/updated" definition and
> makes rss/atom feeds more lineal. Gitlab/Github rss/atom feeds
> use the commited date.
>
> The committed date is already used to determine if more items
> should be fetched.
>
> Signed-off-by: Jesús Ariel Cabello Mateos <080ariel@xxxxxxxxx>
> ---
>  gitweb/gitweb.perl | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> 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,
> --
> 2.45.2
>





[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux