Re: [PATCH v2 5/5] scalar: document config settings
From: Patrick Steinhardt <hidden>
Date: 2025-12-02 07:54:03
On Mon, Dec 01, 2025 at 05:58:06PM +0000, Matthew Hughes wrote:
On Mon, Dec 01, 2025 at 04:50:47PM +0000, Derrick Stolee via GitGitGadget wrote:quoted
Add user-facing documentation that justifies the values being set by 'scalar clone', 'scalar register', and 'scalar reconfigure'.Thanks! This is exactly what I was hoping for.quoted
+REQUIRED AND RECOMMENDED CONFIG +-------------------------------Would it be worth noting in scalar.c that the config options listed there are documented here, So that a dev changing the list in the source will know to also update this? I assume there's an understanding that if e.g. you update a flag you should know to also update relevant docs, but perhaps this is a bit more niche.quoted
+gc.auto=0:: + This disables automatic garbage collection, since Scalar uses background + maintenance to keep the repository data in good shape.Checking my understanding: this means there will be _no_ automatic GC in a scalar repo? Since scalar calls 'maintenance register' which means maintenance.strategy will be set to 'incremental' which won't schedule any gc runs
Yes, auto-garbage-collection is completely disabled in repositories managed by Scalar. And I guess that made sense in the past: auto-maintenance did not know about maintenance strategies at all, and consequently it would still run git-gc(1). And that's not really compatible with the "incremental" strategy that Scalar wants to use. I changed that in Git 2.52 so that maintenance strategies now apply to both scheduled and normal maintenance. But I was worried about backwards compatibility for the "incremental" strategy, so I made the change in a backwards compatible way so that normal maintenance still ends up using git-gc(1). Arguably though, we can now iterate on our infrastructure: if we were to introduce an "incremental-v2" strategy we could adapt it to have proper strategies for both scheduled and normal maintenance. And if so, we can adapt Scalar in such a way that it doesn't have to disable auto maintenance anymore. I think that would be a reasonable thing to do. Scheduled maintenance only runs once per hour, and in a high-activity repo a user may easily generate tons of objects in that hour that make the repository perform badly. Patrick