Re: [GSoC][PATCH v3 4/9] builtin/pack-refs: convert to use the generic refs_optimize() API
- From
shejialuo <shejialuo@gmail.com>
- Date
- Sep 18, 2025, 10:43 UTC
- Message-ID
- <aMviZmilaxXb2a35@ArchLinux>
- In-Reply-To
- <20250918054704.544254-5-meetsoni3017@gmail.com>
On Thu, Sep 18, 2025 at 11:16:59AM +0530, Meet Soni wrote:
> The `git pack-refs` command is tied to the 'files' reference backend. In > a repository that uses a different backend (like 'reftable'), the > command is a no-op. >
I think `git pack-refs` would work for reftable backend. It would eventually call `reftable_be_pack_refs`. And from my intuitive understanding, it would compact the reftable to reduce the size of the table.
Show 5 quoted lines
> To make `git pack-refs` a truly generic frontend for reference > optimization, refactor it to use the new generic `refs_optimize()` API. > This will allow the command to automatically work with any backend > that implements the `optimize` action in the future. >
If my above understanding is correct, "git pack-refs" has already worked with all the backends. But for reftable backend, the semantic of "pack-refs" is not clear, optimize is a much better semantic word.
Thanks, Jialuo