threads / discuss / 10880

auto gc

Subject: auto gc

## tl;dr

3 messages between Nov 15, 2007 and Nov 15, 2007.

replies: 2people: 2as markdown or json

Jens Axboe· Nov 15, 2007, 08:10 UTC · lore
Hi,

I've noticed that recent git versions, in a supposedly helpful fashion, run garbage collection automatically after a pull if it deems it necessary:

[...]
Resolving 556 deltas...
 100% (556/556) done
Updating 9418d5d..99fee6d
Fast forward
Packing your repository for optimum performance. You may also
run "git gc" manually. See "git help gc" for more information.
Generating pack...
[...]

This is extremely annoying behaviour! If I'm on battery or just in a bit of a hurry, I defeinitely don't want git second guessing me and deciding that it's time to run git gc.

I'd suggest just printing a hint that running git gc would increase performance, doing it automatically is definitely bad style (even more so when then yet again changed git refs layout even breaks old scripts, when git gc has run).

-- 
Jens Axboe
Shawn O. Pearce· Nov 15, 2007, 08:20 UTC · re: Jens Axboe · lore

Re: auto gc

Jens Axboe <jens.axboe@oracle.com> wrote: ...

Show 13 quoted lines
> Packing your repository for optimum performance. You may also
> run "git gc" manually. See "git help gc" for more information.
> Generating pack...
> [...]
> 
> This is extremely annoying behaviour! If I'm on battery or just in a bit
> of a hurry, I defeinitely don't want git second guessing me and deciding
> that it's time to run git gc.
> 
> I'd suggest just printing a hint that running git gc would increase
> performance, doing it automatically is definitely bad style (even more
> so when then yet again changed git refs layout even breaks old scripts,
> when git gc has run).
Set the following and it won't run automatically anymore for you:
	git config --global gc.auto 0
	git config --global gc.autopacklimit 0
More recently this message has been changed to:
  Packing your repository for optimum performance. You may also
  run "git gc" manually. See "git help gc" for more information.
The two options noted above are described in the manual for git-gc.
- 
Shawn.
Jens Axboe· Nov 15, 2007, 08:28 UTC · re: Shawn O. Pearce · lore

Re: auto gc

On Thu, Nov 15 2007, Shawn O. Pearce wrote:
Show 20 quoted lines
> Jens Axboe <jens.axboe@oracle.com> wrote:
> ...
> > Packing your repository for optimum performance. You may also
> > run "git gc" manually. See "git help gc" for more information.
> > Generating pack...
> > [...]
> > 
> > This is extremely annoying behaviour! If I'm on battery or just in a bit
> > of a hurry, I defeinitely don't want git second guessing me and deciding
> > that it's time to run git gc.
> > 
> > I'd suggest just printing a hint that running git gc would increase
> > performance, doing it automatically is definitely bad style (even more
> > so when then yet again changed git refs layout even breaks old scripts,
> > when git gc has run).
> 
> Set the following and it won't run automatically anymore for you:
> 
> 	git config --global gc.auto 0
> 	git config --global gc.autopacklimit 0
OK
> More recently this message has been changed to:
> 
>   Packing your repository for optimum performance. You may also
>   run "git gc" manually. See "git help gc" for more information.

Great, that's a lot more appropriate in my opinion. I'll just update to a later git.

Thanks!
-- 
Jens Axboe

← back to recent threads