[prev in list] [next in list] [prev in thread] [next in thread]
List: cgit
Subject: Idle column
From: mackyle () gmail ! com (Kyle J ! McKay)
Date: 2013-07-22 13:13:21
Message-ID: 7311041D-23F6-4EFA-A510-49C074657177 () gmail ! com
[Download RAW message or body]
On Jul 19, 2013, at 04:44, John Keeping wrote:
> On Fri, Jul 19, 2013 at 01:29:52PM +0200, Christian Hesse wrote:
>> cgit is great and I enjoy it a lot. However it has one drawback
>> compared to
>> gitweb: The idle column in repository listing shows the age of a
>> (configurable) file from the repository. I think that is stupid
>> behavior as I
>> have a lot of "0 min." entries if I run "git gc" on my repositories
>> or the
>> date since last push or pull otherwise.
>>
>> In contrast to that gitweb shows the time since the last commit. I
>> would
>> prefer to have that in cgit as well. Any chance to get that? Or is
>> there any
>> good reason why the idle column is as is?
>
> This was discussed a couple of months ago [1]. You can use a hook and
> agefile to make CGit behave like GitWeb as described in that message.
>
> [1] http://article.gmane.org/gmane.comp.version-control.cgit/1059
Actually if you want it to behave like gitweb you'll need to use
something more like:
git for-each-ref --sort=-committerdate --format='%
(committerdate:iso8601)' \
--count=1 refs/heads > info/lastactivity
Since gitweb.perl actually uses:
open($fd, "-|", git_cmd(), 'for-each-ref',
'--format=%(committer)',
'--sort=-committerdate',
'--count=1',
'refs/heads') or return;
to get the timestamp which it uses to compute the age string.
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic