Re: [PATCHv2 5/6] gitweb: last-modified time should be commiter, not author

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

 



On Fri, 06 Feb 2009, Giuseppe Bilotta wrote:
> On Thu, Feb 5, 2009 at 12:38 AM, Jakub Narebski <jnareb@xxxxxxxxx> wrote:
>> On Mon, 26 Jan 2009, Giuseppe Bilotta wrote:
>>
>>> 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.

[...]
>> Second, author time reflects when change (commit) was made, according
>> to authors (perhaps skewed) clock.  Committer time reflects when given
>> commit (version of a commit) was entered into repository, or to be more
>> exact into some clone of given project.  But there is also an issue of
>> when changes got into given instance of repository (given clone): that
>> I guess might be found by stat-ing HEAD (if it arrived by commit),
>> FETCH_HEAD (if it arrived by fetch or pull) and ??? (if it arrived by
>> push)... err... it looks like it wouldn't work in most common case,
>> sorry, unless we want to stat all refs and packed-refs file. But while
>> this date might be better for Last-Modified, I'm not sure if it is good
>> at all for publication date.
>>
>> So committer time is better than author time, and looks like good
>> middle ground.
> 
> Oops should have finished reading your comments before my previous
> reply. The solution would be to introduce a way to determine robustly
> when a branch was last _physically_ updated. Checking the
> corresponding entry in refs/ would work for non-packed refs, and maybe
> one would hope that if the ref got packed, it means it hasn't updated
> in a long time ... but I'm not enough of an expert on git's internal
> to really know about this. Suggestions?

The point is I am not that sure if the date branch was _physically_
updated (it was updated in given clone of repository) is a good
choice for publish date in feed (RSS or Atom), whether it is good
choice for Last-Modified (and If-Modified-Since), and whether publish
date can be different from Last-Modified.  

Using committime doesn't ensure that it is monotonical (but it is
highly probable, much more than authortime), but it is the same for
every clone of repository, and for every gitweb installation that
hosts given repository.

Using update time does ensure that it is monotonical, and it
wouldn't ever be earlier than the time repository started to be
available, but it changes from clone to clone.

-- 
Jakub Narebski
Poland
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[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