git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Re: Why gc --auto is called so rarely?
@ 2017-11-19 17:04 Ilya Kantor
  2017-11-19 18:12 ` Eric Sunshine
  2017-11-20  0:46 ` Junio C Hamano
  0 siblings, 2 replies; 4+ messages in thread
From: Ilya Kantor @ 2017-11-19 17:04 UTC (permalink / raw)
  To: Мой
	Хорватия
  Cc: git

...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.


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Why gc --auto is called so rarely?
  2017-11-19 17:04 Why gc --auto is called so rarely? Ilya Kantor
@ 2017-11-19 18:12 ` Eric Sunshine
  2017-11-20  0:46 ` Junio C Hamano
  1 sibling, 0 replies; 4+ messages in thread
From: Eric Sunshine @ 2017-11-19 18:12 UTC (permalink / raw)
  To: Ilya Kantor
  Cc: Мой
	Хорватия,
	Git List

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.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Why gc --auto is called so rarely?
  2017-11-19 17:04 Why gc --auto is called so rarely? Ilya Kantor
  2017-11-19 18:12 ` Eric Sunshine
@ 2017-11-20  0:46 ` Junio C Hamano
  1 sibling, 0 replies; 4+ messages in thread
From: Junio C Hamano @ 2017-11-20  0:46 UTC (permalink / raw)
  To: Ilya Kantor
  Cc: Мой
	Хорватия,
	git

Ilya Kantor <ilya.a.kantor@icloud.com> writes:

> ...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.



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Why gc --auto is called so rarely?
@ 2017-11-19 14:55 Ilya Kantor
  0 siblings, 0 replies; 4+ messages in thread
From: Ilya Kantor @ 2017-11-19 14:55 UTC (permalink / raw)
  To: git

Hello,

I tried to find places where git gc --auto is called, and found that
there's only a few.

First, in *some* merges. That is, if there was a conflict during the
merge, that is resolved, then it's not called.

Then in
* receive-pack
* fetch
* am

Is there any logic in such assignments? Why there?

In particular, gc --auto was called in commits earlier, but not in the
recent versions of git.

---
Best Regards,
Ilya Kantor

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2017-11-20  0:46 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-11-19 17:04 Why gc --auto is called so rarely? Ilya Kantor
2017-11-19 18:12 ` Eric Sunshine
2017-11-20  0:46 ` Junio C Hamano
  -- strict thread matches above, loose matches on Subject: below --
2017-11-19 14:55 Ilya Kantor

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).