git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Jesús Ariel Cabello Mateos" <080ariel@gmail.com>
To: git@vger.kernel.org
Cc: gitster@pobox.com, "Jesús Ariel Cabello Mateos" <080ariel@gmail.com>
Subject: [PATCH v3] gitweb: rss/atom change published/updated date to committer date
Date: Sun,  7 Jul 2024 18:48:13 +0000	[thread overview]
Message-ID: <20240707184813.33166-1-080ariel@gmail.com> (raw)
In-Reply-To: <20240704164547.94341-1-080ariel@gmail.com>

The author date is used for published/updated date in the rss/atom
feed stream. 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.

Additionally, to be consistent, also use the committer date to 
determine the date of the last commit to send in the feed 
instead of the author date.

Signed-off-by: Jesús Ariel Cabello Mateos <080ariel@gmail.com>
---
Changes since v2:

- Fix line wrapping in patch
- Also use authored date for processing loop.
- Rewrite commit message for clarity.

Thank you, Junio!

 gitweb/gitweb.perl | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl
index ccd14e0e30..b09a8d0523 100755
--- a/gitweb/gitweb.perl
+++ b/gitweb/gitweb.perl
@@ -8326,10 +8326,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,
-- 
2.45.2


  parent reply	other threads:[~2024-07-07 18:48 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-07-04 16:45 [PATCH] gitweb: rss/atom change published/updated date to committed date Jesús Ariel Cabello Mateos
2024-07-06  6:08 ` Junio C Hamano
2024-07-06 16:16 ` [PATCH v2] gitweb: rss/atom change published/updated date to committer date Ariel Cabello Mateos
2024-07-06 22:01   ` Junio C Hamano
2024-07-06 22:35     ` Junio C Hamano
2024-07-07 18:48 ` Jesús Ariel Cabello Mateos [this message]
2024-07-08 11:11   ` [PATCH v3] " Junio C Hamano

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240707184813.33166-1-080ariel@gmail.com \
    --to=080ariel@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).