From: Junio C Hamano <gitster@pobox.com>
To: "brian m. carlson" <sandals@crustytoothpaste.net>
Cc: John Lin via GitGitGadget <gitgitgadget@gmail.com>,
git@vger.kernel.org, John Lin <johnlinp@gmail.com>
Subject: Re: [PATCH] Recommend "git gc --auto" instead of "git prune"
Date: Sun, 07 Jun 2020 10:10:19 -0700 [thread overview]
Message-ID: <xmqq8sgyn6o4.fsf@gitster.c.googlers.com> (raw)
In-Reply-To: <20200607162556.GJ6569@camp.crustytoothpaste.net> (brian m. carlson's message of "Sun, 7 Jun 2020 16:25:56 +0000")
"brian m. carlson" <sandals@crustytoothpaste.net> writes:
>> diff --git a/builtin/gc.c b/builtin/gc.c
>> index 8e0b9cf41b3..3833a3de332 100644
>> --- a/builtin/gc.c
>> +++ b/builtin/gc.c
>> @@ -692,7 +692,7 @@ int cmd_gc(int argc, const char **argv, const char *prefix)
>>
>> if (auto_gc && too_many_loose_objects())
>> warning(_("There are too many unreachable loose objects; "
>> - "run 'git prune' to remove them."));
>> + "run 'git gc --auto' to remove them."));
>
> I'm not sure this is correct. If we have just expelled a large number
> of objects from a pack into loose objects because they're no longer
> referenced, it's possible we may trigger another git gc --auto on the
> next time we run a command. If so, no amount of git gc --auto is going
> to help here; you really have to run git prune.
Correct. When running manually, after noticing the need to do a GC,
it is a mental bug to add "--auto" to it, I would think.
next prev parent reply other threads:[~2020-06-07 17:10 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-06-07 16:18 [PATCH] Recommend "git gc --auto" instead of "git prune" John Lin via GitGitGadget
2020-06-07 16:25 ` brian m. carlson
2020-06-07 17:10 ` Junio C Hamano [this message]
2020-06-07 20:45 ` Denton Liu
2020-06-08 17:34 ` Junio C Hamano
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=xmqq8sgyn6o4.fsf@gitster.c.googlers.com \
--to=gitster@pobox.com \
--cc=git@vger.kernel.org \
--cc=gitgitgadget@gmail.com \
--cc=johnlinp@gmail.com \
--cc=sandals@crustytoothpaste.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).