git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] gitweb: last-modified time should be commiter, not author

From
Jakub Narebski <jnareb@gmail.com>
Date
Jan 26, 2009, 01:54 UTC
Message-ID
<200901260254.49919.jnareb@gmail.com>
In-Reply-To
<1232923370-4427-1-git-send-email-giuseppe.bilotta@gmail.com>
On Sun, 25 Jan 2009, Giuseppe Bilotta wrote:
> Subject: [PATCH] gitweb: last-modified time should be commiter, not author

Should be really either "[PATCH 1/2]" or "[PATCH 5/4]" or "[PATCH 5/6]" just in case for the next patch, because next patch _depends_ on this one, and just in case of threading problem it should be marked as it; it also makes easier to apply patches from emails saved as individual files each.

Show 8 quoted lines
>
> The last-modified time header added by RSS to increase cache hits from
> readers should be set to the date the repository was last modified. The
> author time in this respect is not a good guess because the last commit
> might come from a oldish patch.
> 
> Use the committer time for the last-modified header to ensure a more
> correct guess of the last time the repository was modified.

Good catch, good thinking IMHO. Committer date has much better chance to be monotonic than author date, and is more close related to _publishing_ date (author date is more of _creation_ date).

Lack signoff; if Junio forges it (or you reply that it should be signed off), you can add from me

Acked-by: Jakub Narebski <jnareb@gmail.com>

P.S. I wonder what other web interfaces do, for example cgit. I guess that web interfaces for other SCMs like SVN::Web, ViewVC etc. do not have this problem because they have only one, single date.

Show 21 quoted lines
> ---
>  gitweb/gitweb.perl |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl
> index 756868a..8c49c75 100755
> --- a/gitweb/gitweb.perl
> +++ b/gitweb/gitweb.perl
> @@ -6015,7 +6015,7 @@ sub git_feed {
>  	}
>  	if (defined($commitlist[0])) {
>  		%latest_commit = %{$commitlist[0]};
> -		%latest_date   = parse_date($latest_commit{'author_epoch'});
> +		%latest_date   = parse_date($latest_commit{'committer_epoch'});
>  		print $cgi->header(
>  			-type => $content_type,
>  			-charset => 'utf-8',
> -- 
> 1.5.6.5
> 
> 
-- 
Jakub Narebski
Poland
Previous: Jakub NarebskiNext: Giuseppe Bilotta
Message 11 of 13 in “gitweb feed metadata tuneups”
  1. 0/4 gitweb feed metadata tuneupsGiuseppe Bilotta, Jan 23, 2009
  2. 1/4 gitweb: channel image in rss feedGiuseppe Bilotta, Jan 23, 2009
  3. 2/4 gitweb: feed generator metadataGiuseppe Bilotta, Jan 23, 2009
  4. 3/4 gitweb: rss feed managingEditorGiuseppe Bilotta, Jan 23, 2009
  5. 4/4 gitweb: rss channel dateGiuseppe Bilotta, Jan 23, 2009
  6. gitweb: last-modified time should be commiter, not authorGiuseppe Bilotta, Jan 25, 2009
  7. gitweb: check if-modified-since for feedsGiuseppe Bilotta, Jan 25, 2009
  8. Jakub NarebskiJan 26, 2009
  9. Giuseppe BilottaJan 26, 2009
  10. Jakub NarebskiFeb 2, 2009
  11. Jakub NarebskiJan 26, 2009
  12. Giuseppe BilottaJan 26, 2009
  13. Jakub NarebskiJan 24, 2009

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.