Skip to contentSkip to conversation

git gc/prune runs again and again

DISCUSSION Andreas Krey 2 participants 3 messages Jun 15, 2016

lore
Share & tools
lore
#0 lore raw

Hi all,

I have a bit of an annoying behaviour in git gc; there is a repo I regularly do a fetch in, and this kicks off a gc/prune every time. I remember there being a heuristic with being that many files in .git/objects/17 as the gc trigger.

Which is unfortunate if the gc does not actually reduce the number of files there because they aren't old enough => gc comes right back.

What can I do there? (This git is a bit old, 2.2.2)

Andreas

Signature · 3 lines
"Totally trivial. Famous last words."
From: Linus Torvalds <torvalds@*.org>
Date: Fri, 22 Jan 2010 07:29:21 -0800
#1 lore raw
Quoted 8 lines · Andreas Krey

Hi all,

I have a bit of an annoying behaviour in git gc; there is a repo I regularly do a fetch in, and this kicks off a gc/prune every time. I remember there being a heuristic with being that many files in .git/objects/17 as the gc trigger.

Quoted 5 lines

Which is unfortunate if the gc does not actually reduce the number of files there because they aren't old enough => gc comes right back.

What can I do there? (This git is a bit old, 2.2.2)

Run "git prune". 2.2.2 hides this suggestion to run git-prune in this case. The next git version will show it back.

Signature · 1 line
Duy
#2 lore raw

On Tue, 03 Nov 2015 16:01:24 +0000, Duy Nguyen wrote:
....

Quoted 5 lines
Quoted 5 lines

I have a bit of an annoying behaviour in git gc; there is a repo I regularly do a fetch in, and this kicks off a gc/prune every time. I remember there being a heuristic with being that many files in .git/objects/17 as the gc trigger.

(It might be a good idea to use a random slot here.)

...

Quoted 4 lines
Quoted 1 line

What can I do there? (This git is a bit old, 2.2.2)

Run "git prune". 2.2.2 hides this suggestion to run git-prune in this case. The next git version will show it back.

Actually, there is a 'git prune --expire 2.weeks.ago --no-progress' running under the 'git gc --auto --quiet', and I don't want to drop the expiry time lightly.

Andreas

Signature · 3 lines
"Totally trivial. Famous last words."
From: Linus Torvalds <torvalds@*.org>
Date: Fri, 22 Jan 2010 07:29:21 -0800