git gc and idle times

Ferry Huberts mailings at hupie.com
Fri May 13 19:01:14 CEST 2011


On 05/11/2011 04:47 PM, Lukas Fleischer wrote:
> On Wed, May 11, 2011 at 04:06:28PM +0200, Thomas Moschny wrote:
>> Hi,
>>
>> we are using cgit 0.9 successfully on a bunch of repositories. Nice
>> tool!
>>
>> One question however: After running git-gc on some of the repositories,
>> the overview page of cgit misses idle times for those. The idle time is
>> back after pushing a commit. Is there something that needs to be
>> adjusted/fixed manually after running git-gc? Or is it a bug of cgit?
> 
> cgit uses the mtime of the file containing the default branch's HEAD ref
> to guess the idle time if there's no agefile. If you pack heads and tags
> there won't be such a file anymore, resulting in no idle time being
> displayed.
> 
> You could try to set "gc.packrefs" to "notbare" to prevent the garbage
> collector from packing refs as a workaround.
> 

I have this too.

When repos are repacked then some refs can end up in packed-refs,
including the ref for the default branch.

I think cgit should add one more fallback to look for packed-refs before
giving up.

I'll be submitting a patch later to this effect.

grtz

-- 
Ferry Huberts




More information about the CGit mailing list