Re: [PATCH 1/4] gc docs: modernize the advice for manually running "gc"
- From
Jeff King <peff@peff.net>
- Date
- Mar 18, 2019, 21:27 UTC
- Message-ID
- <20190318212719.GE29661@sigill.intra.peff.net>
- In-Reply-To
- <20190318161502.7979-2-avarab@gmail.com>
On Mon, Mar 18, 2019 at 05:14:59PM +0100, Ævar Arnfjörð Bjarmason wrote:
Show 5 quoted lines
> The docs have been recommending that users need to run this manually, > but that hasn't been needed in practice for a long time. > > Let's instead have this reflect reality and say that most users don't > need to run this manually at all.
Yeah, I think this makes sense.
Show 7 quoted lines
> -Users are encouraged to run this task on a regular basis within > -each repository to maintain good disk space utilization and good > -operating performance. > +Most users should not have to run this command manually. When common > +porcelain operations that create objects are run, such as > +linkgit:git-commit[1] and linkgit:git-fetch[1], `git gc --auto` will > +be run automatically.
This is in the description, before "--auto" is introduced. I wonder if it is worth just describing it briefly, like:
When common porcelain operations that creates objects are run, they will check whether the repository has grown substantially since the last maintenance, and if so run `git gc` automatically.
That gives a first-time reader an idea of whether they need to care about this command without having to dig into what "--auto" is.
-Peff