threads / discuss / 47243

Re: Why gc --auto is called so rarely?

Subject: Re: Why gc --auto is called so rarely?

## tl;dr

3 messages between Nov 19, 2017 and Nov 20, 2017.

replies: 2people: 3as markdown or json

Ilya Kantor· Nov 19, 2017, 17:04 UTC · lore
...It seems sane to git gc --auto from command that are expected to take time.
That's probably the reason why it's not called on commits and called on receive-pack. 

But then why call it on merges? Especially on those that have no conflicts and should run fast. Also, merges are not supposed to introduce unreachable objects.

P.S. The old gmane discussion referenced by some previous posts on this subject is lost.
Eric Sunshine· Nov 19, 2017, 18:12 UTC · re: Ilya Kantor · lore
On Sun, Nov 19, 2017 at 12:04 PM, Ilya Kantor <ilya.a.kantor@icloud.com> wrote:
> P.S. The old gmane discussion referenced by some previous posts on this subject is lost.

You can find old gmane conversations at https://public-inbox.org/git/ by searching for "gmane:<id>" in the search field, where <id> is the gmane ID number of the message.

Junio C Hamano· Nov 20, 2017, 00:46 UTC · re: Ilya Kantor · lore
Ilya Kantor <ilya.a.kantor@icloud.com> writes:
Show 8 quoted lines
> ...It seems sane to git gc --auto from command that are expected to take time.
>
> That's probably the reason why it's not called on commits and
> called on receive-pack.
>
> But then why call it on merges? Especially on those that have no
> conflicts and should run fast.  Also, merges are not supposed to
> introduce unreachable objects.

The primary thing we want the users get out of running "gc --auto" during these operations are not the removal of unreachable garbage. It is primarily run to reduce the number of loose objects and prevent great many numbers of tiny packfiles from being accumulated, so the places you see calls to it tend to be after creating new objects in the repository.

← back to recent threads