Subject: Re: [GSoC][PATCH v3 4/9] builtin/pack-refs: convert to use the generic refs_optimize() API

From: shejialuo <[email-masked]>
Date: Thu, 18 Sep 2025 18:43:50 +0800

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.

> 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