CGit and modification times

Ferry Huberts mailings at
Wed May 18 13:02:37 CEST 2011

On 05/18/2011 12:19 PM, Julius Plenz wrote:
> Hi, Ferry!
> * Ferry Huberts <mailings at> [2011-05-15 12:00]:
>>> This obviously is a bit more expensive but maybe also a bit more correct?
>> Thought about it a bit more and I think current behaviour (+ the
>> packed-refs patch) is good enough.
> It is pretty expensive to cover all the corner cases like packed refs.
> Also, the file's modification time might not be the time the last
> commit was made.

I came to the same conclusion, that's why I said that the current
behaviour is good enough.

I still would like to see the packed-refs fallback patch integrated though :-)

> Unless you want to do this expensive look up every time you request a
> repository listing (caching aside), your best bet is to write the
> commit date to a so-called agefile. You find out the date of the last
> commit upon a "git push" (via an update hook) and later retrieve it
> (which is a fast operation: simply reading in a small file).
> See here for an example command:
> Lars: It may be worth starting a FAQ page. What do you think?

I think it'd be better to include (part of) the comment of that commit in
the cgitrc.5.txt file! :-)

a FAQ is then not needed IMHO

> Julius
> _______________________________________________
> cgit mailing list
> cgit at


Ferry Huberts

More information about the CGit mailing list