Re: [PATCH 2/2] refs/files: use heuristic to decide whether to repack with `--auto`
- From
Patrick Steinhardt <ps@pks.im>
- Date
- Sep 4, 2024, 08:49 UTC
- Message-ID
- <ZtgfIPOZO1p4_ExF@pks.im>
- In-Reply-To
- <CAOLa=ZRGvU4LvX9kjvF3dJCTvKR6CC1CwPTp515c3Wt5M8a5vA@mail.gmail.com>
On Tue, Sep 03, 2024 at 02:00:16AM -0700, karthik nayak wrote:
Show 16 quoted lines
> Patrick Steinhardt <ps@pks.im> writes: > > > The `--auto` flag for git-pack-refs(1) allows the ref backend to decide > > whether or not a repack is in order. This switch has been introduced > > mostly with the "reftable" backend in mind, which already knows to > > auto-compact its tables during normal operations. When the flag is set, > > then it will use the same auto-compaction mechanism and thus end up > > doing nothing in most cases. > > > > The "files" backend does not have any such heuristic yet and instead > > Nit: s/instead/will instead/ > > > packs any loose references unconditionally. So we rewrite the complete > > "packed-refs" file even if there's only a single loose reference to be > > packed.
Revisiting this: isn't the current version of this sentence correct? Replacing it with "will instead" certainly makes it incorrect without also changing "packs" to "pack".
Patrick