Subject: Re: [PATCH] prune: --expire=time

From: Simon 'corecode' Schubert <[email-masked]>
Date: Sat, 20 Jan 2007 13:06:19 +0100

Junio C Hamano wrote:
>> Things I'm not sure about, any further comments/discussion?
>> - default value for gc.pruneexpire
>> - special value(s) for gc.pruneexpire/--expire which mean 'do not
>>   check for the age', currently it is 'off'
> 
> No single timeout value can be the right timeout for everybody,
> so a big debate is not useful here.  I think 1 day as you and
> Shawn did makes sense.

Not that I want to sabotage this discussion, but you have a very valid point.  A timeout can always be crossed, and then bad things[tm] happen.

My idea is to create a marker file when creating (yet) unconnected loose objects, i.e. on commit/push/fetch.  After the ref was updated or on abort, this marker would be removed.  Prune then can simply search for the oldest marker and only remove objects older than this marker.

Of course this also can mean that a marker file somehow stays and prune fails to clean properly, but that's still better than accidentially cleaning too much.  In the case of dangling marker files, the admin would simply remove them.  rm .git/marker/* when the repo is quiet.

cheers
  simon

-- 
Serve - BSD     +++  RENT this banner advert  +++    ASCII Ribbon   /"\
Work - Mac      +++  space for low €€€ NOW!1  +++      Campaign     \ /
Party Enjoy Relax   |   http://dragonflybsd.org      Against  HTML   \
Dude 2c 2 the max   !   http://golden-apple.biz       Mail + News   / \