Re: git pull & git gc
- From
Duy Nguyen <pclouds@gmail.com>
- Date
- Mar 19, 2015, 09:47 UTC
- Message-ID
- <CACsJy8C9RF-PoJNs4PTOg_A0O=RVxZQRDp_UGxtJ_vQ-7h-L3A@mail.gmail.com>
- In-Reply-To
- <20150318145815.GN1369@serenity.lan>
On Wed, Mar 18, 2015 at 9:58 PM, John Keeping <john@keeping.me.uk> wrote:
Show 20 quoted lines
> On Wed, Mar 18, 2015 at 09:41:59PM +0700, Duy Nguyen wrote: >> On Wed, Mar 18, 2015 at 9:33 PM, Duy Nguyen <pclouds@gmail.com> wrote: >> > If not, I made some mistake in analyzing this and we'll start again. >> >> I did make one mistake, the first "gc" should have reduced the number >> of loose objects to zero. Why didn't it.? I'll come back to this >> tomorrow if nobody finds out first :) > > Most likely they are not referenced by anything but are younger than 2 > weeks. > > I saw a similar issue with automatic gc triggering after every operation > when I did something equivalent to: > > git add <lots of files> > git commit > git reset --hard HEAD^ > > which creates a log of unreachable objects which are not old enough to > be pruned.
And there's another problem caused by background gc. If it's not run in background, it should print this
warning: There are too many unreachable loose objects; run 'git prune' to remove them.
but because background gc does not have access to stdout/stderr anymore, this is lost.
-- Duy