{"thread":{"id":"61736","subject":"[PATCH] gitweb: rss/atom change published/updated date to committed date","startedAt":"2024-07-04T16:46:19Z","lastAt":"2024-07-08T11:11:47Z","messageCount":7,"participants":["Jesús Ariel Cabello Mateos","Junio C Hamano","Ariel Cabello Mateos"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"498088","messageId":"20240704164547.94341-1-080ariel@gmail.com","threadId":"61736","inReplyTo":null,"subject":"[PATCH] gitweb: rss/atom change published/updated date to committed date","fromName":"Jesús Ariel Cabello Mateos","fromEmail":"080ariel@gmail.com","sentAt":"2024-07-04T16:45:35Z","receivedAt":"2024-07-04T16:46:19Z","isPatch":true,"sender":{"key":"080ariel@gmail.com","avatar":"https://avatars.githubusercontent.com/u/57076905?v=4"},"body":"Currently the published(in rss) and the updated(in atom) date\nused is the authored date. Change it to the committed date \nthat betters reflect the \"published/updated\" definition and \nmakes rss/atom feeds more lineal. Gitlab/Github rss/atom feeds \nuse the commited date.\n\nThe committed date is already used to determine if more items\nshould be fetched.\n\nSigned-off-by: Jesús Ariel Cabello Mateos <080ariel@gmail.com>\n---\n gitweb/gitweb.perl | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)\n\ndiff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl\nindex ccd14e0e30..0ef5707557 100755\n--- a/gitweb/gitweb.perl\n+++ b/gitweb/gitweb.perl\n@@ -8329,7 +8329,7 @@ sub git_feed {\n \t\tif (($i >= 20) && ((time - $co{'author_epoch'}) > 48*60*60)) {\n \t\t\tlast;\n \t\t}\n-\t\tmy %cd = parse_date($co{'author_epoch'}, $co{'author_tz'});\n+\t\tmy %cd = parse_date($co{'committer_epoch'}, $co{'committer_tz'});\n \n \t\t# get list of changed files\n \t\topen my $fd, \"-|\", git_cmd(), \"diff-tree\", '-r', @diff_opts,\n-- \n2.45.2\n\n"},{"id":"498144","messageId":"xmqq7cdz3vdx.fsf@gitster.g","threadId":"61736","inReplyTo":"20240704164547.94341-1-080ariel@gmail.com","subject":"Re: [PATCH] gitweb: rss/atom change published/updated date to committed date","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2024-07-06T06:08:26Z","receivedAt":"2024-07-06T06:08:28Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Jesús Ariel Cabello Mateos <080ariel@gmail.com> writes:\n\n> Currently the published(in rss) and the updated(in atom) date\n> used is the authored date. Change it to the committed date \n> that betters reflect the \"published/updated\" definition and \n> makes rss/atom feeds more lineal. Gitlab/Github rss/atom feeds \n> use the commited date.\n>\n> The committed date is already used to determine if more items\n> should be fetched.\n\nEven though \"authored\" and \"committed\" date may be grammatically\ncorrect if you use \"to author\" and \"to commit\" as verbs, the name we\nuse for these two timestamps are \"author date\" and \"committer date\"\n(in other words, \"author\" and \"committer\" are not used as verbs but\nas nouns for possibly two distinct people).  So\n\n * \"committed date\" (on the title and elsewhere) and \"commited date\"\n   -> \"committer date\".\n\n * \"authored date\" -> \"author date\".\n\n * \"lineal\" -> \"linear\"?\n\nBut your reasoning is absolutely correct about the concept of\n\"publish\" more closely corresponds to the committer date than the\nauthor date, and the change looks sensible.\n\n> Signed-off-by: Jesús Ariel Cabello Mateos <080ariel@gmail.com>\n> ---\n>  gitweb/gitweb.perl | 2 +-\n>  1 file changed, 1 insertion(+), 1 deletion(-)\n>\n> diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl\n> index ccd14e0e30..0ef5707557 100755\n> --- a/gitweb/gitweb.perl\n> +++ b/gitweb/gitweb.perl\n> @@ -8329,7 +8329,7 @@ sub git_feed {\n>  \t\tif (($i >= 20) && ((time - $co{'author_epoch'}) > 48*60*60)) {\n>  \t\t\tlast;\n>  \t\t}\n> -\t\tmy %cd = parse_date($co{'author_epoch'}, $co{'author_tz'});\n> +\t\tmy %cd = parse_date($co{'committer_epoch'}, $co{'committer_tz'});\n>  \n>  \t\t# get list of changed files\n>  \t\topen my $fd, \"-|\", git_cmd(), \"diff-tree\", '-r', @diff_opts,\n"},{"id":"498168","messageId":"CALRJROB7gGWok-YPGTjPe+TXkU5Y_MhqcPSiCGoPDzJ=WGHoKA@mail.gmail.com","threadId":"61736","inReplyTo":"20240704164547.94341-1-080ariel@gmail.com","subject":"[PATCH v2] gitweb: rss/atom change published/updated date to committer date","fromName":"Ariel Cabello Mateos","fromEmail":"080ariel@gmail.com","sentAt":"2024-07-06T16:16:15Z","receivedAt":"2024-07-06T16:16:26Z","isPatch":true,"sender":{"key":"080ariel@gmail.com","avatar":"https://avatars.githubusercontent.com/u/57076905?v=4"},"body":"Currently the value used is the author date. Change it to the\ncommitter date that betters reflect the \"published/updated\" definition\nand makes rss/atom feeds more linear. Gitlab/Github rss/atom feeds use\nthe committer date.\n\nThe committer date is already used to determine if more items should be fetched.\n\nSigned-off-by: Jesús Ariel Cabello Mateos <080ariel@gmail.com>\n---\nChanges since v1:\n- Typo fix in the commit message.\n- Semantic fixes in the commit message.\n\nThank you, Junio!\n\n gitweb/gitweb.perl | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)\n\ndiff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl\nindex ccd14e0e30..0ef5707557 100755\n--- a/gitweb/gitweb.perl\n+++ b/gitweb/gitweb.perl\n@@ -8329,7 +8329,7 @@ sub git_feed {\n                if (($i >= 20) && ((time - $co{'author_epoch'}) > 48*60*60)) {\n                        last;\n                }\n-               my %cd = parse_date($co{'author_epoch'}\n, $co{'author_tz'});\n+               my %cd = parse_date($co{'committer_epoch'},\n$co{'committer_tz'});\n\n                # get list of changed files\n                open my $fd, \"-|\", git_cmd(), \"diff-tree\", '-r', @diff_opts,\n--\n2.45.2\n\nOn Thu, Jul 4, 2024 at 4:46 PM Jesús Ariel Cabello Mateos\n<080ariel@gmail.com> wrote:\n>\n> Currently the published(in rss) and the updated(in atom) date\n> used is the authored date. Change it to the committed date\n> that betters reflect the \"published/updated\" definition and\n> makes rss/atom feeds more lineal. Gitlab/Github rss/atom feeds\n> use the commited date.\n>\n> The committed date is already used to determine if more items\n> should be fetched.\n>\n> Signed-off-by: Jesús Ariel Cabello Mateos <080ariel@gmail.com>\n> ---\n>  gitweb/gitweb.perl | 2 +-\n>  1 file changed, 1 insertion(+), 1 deletion(-)\n>\n> diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl\n> index ccd14e0e30..0ef5707557 100755\n> --- a/gitweb/gitweb.perl\n> +++ b/gitweb/gitweb.perl\n> @@ -8329,7 +8329,7 @@ sub git_feed {\n>                 if (($i >= 20) && ((time - $co{'author_epoch'}) > 48*60*60)) {\n>                         last;\n>                 }\n> -               my %cd = parse_date($co{'author_epoch'}, $co{'author_tz'});\n> +               my %cd = parse_date($co{'committer_epoch'}, $co{'committer_tz'});\n>\n>                 # get list of changed files\n>                 open my $fd, \"-|\", git_cmd(), \"diff-tree\", '-r', @diff_opts,\n> --\n> 2.45.2\n>\n"},{"id":"498176","messageId":"xmqq8qyenpsz.fsf@gitster.g","threadId":"61736","inReplyTo":"CALRJROB7gGWok-YPGTjPe+TXkU5Y_MhqcPSiCGoPDzJ=WGHoKA@mail.gmail.com","subject":"Re: [PATCH v2] gitweb: rss/atom change published/updated date to committer date","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2024-07-06T22:01:00Z","receivedAt":"2024-07-06T22:01:09Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Ariel Cabello Mateos <080ariel@gmail.com> writes:\n\n> Currently the value used is the author date. Change it to the\n> committer date that betters reflect the \"published/updated\" definition\n> and makes rss/atom feeds more linear. Gitlab/Github rss/atom feeds use\n> the committer date.\n>\n> The committer date is already used to determine if more items should be fetched.\n>\n> Signed-off-by: Jesús Ariel Cabello Mateos <080ariel@gmail.com>\n> ---\n> Changes since v1:\n> - Typo fix in the commit message.\n> - Semantic fixes in the commit message.\n\nerror: corrupt patch at line 20\n\n\n\n> diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl\n> index ccd14e0e30..0ef5707557 100755\n> --- a/gitweb/gitweb.perl\n> +++ b/gitweb/gitweb.perl\n> @@ -8329,7 +8329,7 @@ sub git_feed {\n>                 if (($i >= 20) && ((time - $co{'author_epoch'}) > 48*60*60)) {\n>                         last;\n>                 }\n> -               my %cd = parse_date($co{'author_epoch'}\n> , $co{'author_tz'});\n> +               my %cd = parse_date($co{'committer_epoch'},\n> $co{'committer_tz'});\n>\n>                 # get list of changed files\n>                 open my $fd, \"-|\", git_cmd(), \"diff-tree\", '-r', @diff_opts,\n"},{"id":"498179","messageId":"xmqqle2em9mi.fsf@gitster.g","threadId":"61736","inReplyTo":"xmqq8qyenpsz.fsf@gitster.g","subject":"Re: [PATCH v2] gitweb: rss/atom change published/updated date to committer date","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2024-07-06T22:35:49Z","receivedAt":"2024-07-06T22:35:54Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Junio C Hamano <gitster@pobox.com> writes:\n\n> Ariel Cabello Mateos <080ariel@gmail.com> writes:\n>\n>> Currently the value used is the author date. Change it to the\n\nIt is left unsaid what \"the value\" is used for.  Let's rewrite the\nfirst sentence like so:\n\n    The author date is used for published/updated date in the\n    rss/atom feed stream.  Change it to ...\n\nAnother thing that is curious is why the mention of author_epoch is\nleft as is before the hunk.\n\nShouldn't we use the same committer time for loop cut-off and also\nfor display?\n\ndiff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl\nindex e66eb3d9ba..c1151544cc 100755\n--- a/gitweb/gitweb.perl\n+++ b/gitweb/gitweb.perl\n@@ -8324,10 +8324,10 @@ sub git_feed {\n \t\tmy %co = %{$commitlist[$i]};\n \t\tmy $commit = $co{'id'};\n \t\t# we read 150, we always show 30 and the ones more recent than 48 hours\n-\t\tif (($i >= 20) && ((time - $co{'author_epoch'}) > 48*60*60)) {\n+\t\tif (($i >= 20) && ((time - $co{'committer_epoch'}) > 48*60*60)) {\n \t\t\tlast;\n \t\t}\n-\t\tmy %cd = parse_date($co{'author_epoch'}, $co{'author_tz'});\n+\t\tmy %cd = parse_date($co{'committer_epoch'}, $co{'committer_tz'});\n \n \t\t# get list of changed files\n \t\topen my $fd, \"-|\", git_cmd(), \"diff-tree\", '-r', @diff_opts,\n-- \n2.45.2-899-gfb4fe62777\n\n"},{"id":"498202","messageId":"20240707184813.33166-1-080ariel@gmail.com","threadId":"61736","inReplyTo":"20240704164547.94341-1-080ariel@gmail.com","subject":"[PATCH v3] gitweb: rss/atom change published/updated date to committer date","fromName":"Jesús Ariel Cabello Mateos","fromEmail":"080ariel@gmail.com","sentAt":"2024-07-07T18:48:13Z","receivedAt":"2024-07-07T18:48:18Z","isPatch":true,"sender":{"key":"080ariel@gmail.com","avatar":"https://avatars.githubusercontent.com/u/57076905?v=4"},"body":"The author date is used for published/updated date in the rss/atom\nfeed stream. Change it to the committer date that betters reflect\nthe \"published/updated\" definition and makes rss/atom feeds more\nlinear. Gitlab/Github rss/atom feeds use the committer date.\n\nAdditionally, to be consistent, also use the committer date to \ndetermine the date of the last commit to send in the feed \ninstead of the author date.\n\nSigned-off-by: Jesús Ariel Cabello Mateos <080ariel@gmail.com>\n---\nChanges since v2:\n\n- Fix line wrapping in patch\n- Also use authored date for processing loop.\n- Rewrite commit message for clarity.\n\nThank you, Junio!\n\n gitweb/gitweb.perl | 4 ++--\n 1 file changed, 2 insertions(+), 2 deletions(-)\n\ndiff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl\nindex ccd14e0e30..b09a8d0523 100755\n--- a/gitweb/gitweb.perl\n+++ b/gitweb/gitweb.perl\n@@ -8326,10 +8326,10 @@ sub git_feed {\n \t\tmy %co = %{$commitlist[$i]};\n \t\tmy $commit = $co{'id'};\n \t\t# we read 150, we always show 30 and the ones more recent than 48 hours\n-\t\tif (($i >= 20) && ((time - $co{'author_epoch'}) > 48*60*60)) {\n+\t\tif (($i >= 20) && ((time - $co{'committer_epoch'}) > 48*60*60)) {\n \t\t\tlast;\n \t\t}\n-\t\tmy %cd = parse_date($co{'author_epoch'}, $co{'author_tz'});\n+\t\tmy %cd = parse_date($co{'committer_epoch'}, $co{'committer_tz'});\n \n \t\t# get list of changed files\n \t\topen my $fd, \"-|\", git_cmd(), \"diff-tree\", '-r', @diff_opts,\n-- \n2.45.2\n\n"},{"id":"498237","messageId":"xmqqr0c4kuj5.fsf@gitster.g","threadId":"61736","inReplyTo":"20240707184813.33166-1-080ariel@gmail.com","subject":"Re: [PATCH v3] gitweb: rss/atom change published/updated date to committer date","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2024-07-08T11:11:42Z","receivedAt":"2024-07-08T11:11:47Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Jesús Ariel Cabello Mateos <080ariel@gmail.com> writes:\n\n> ...\n> Additionally, to be consistent, also use the committer date to \n> determine the date of the last commit to send in the feed \n> instead of the author date.\n>\n> Signed-off-by: Jesús Ariel Cabello Mateos <080ariel@gmail.com>\n> ---\n\nNicely done.  Will queue.  Let me mark the topic for 'next'.\n\nThanks.\n"}]}