Re: [PATCH 2/4] refs: cleanup code around optimization
- From
Justin Tobler <jltobler@gmail.com>
- Date
- Oct 15, 2025, 22:09 UTC
- Message-ID
- <wlq4kncpjgbsnc6bjhusgu32d3apagcykax2tquotdanyfejcy@2k4tlhv35fxy>
- In-Reply-To
- <20251015-refs-code-cleanup-v1-2-550fdd8a3b41@gmail.com>
On 25/10/15 11:25PM, Karthik Nayak wrote:
> The previous commit moved all backends to only use/support the
s/commit,/commit/
Show 24 quoted lines
> 'optimize' function within the `ref_store` structure. With this, cleanup
> all references to the 'pack_refs' field of the structure and code around
> it.
>
> Signed-off-by: Karthik Nayak <karthik.188@gmail.com>
> ---
> refs.c | 6 ------
> refs.h | 8 +-------
> refs/refs-internal.h | 3 ---
> 3 files changed, 1 insertion(+), 16 deletions(-)
>
> diff --git a/refs.c b/refs.c
> index a41a94ae55..b9a4a60646 100644
> --- a/refs.c
> +++ b/refs.c
> @@ -2313,12 +2313,6 @@ void base_ref_store_init(struct ref_store *refs, struct repository *repo,
> refs->gitdir = xstrdup(path);
> }
>
> -/* backend functions */
> -int refs_pack_refs(struct ref_store *refs, struct pack_refs_opts *opts)
> -{
> - return refs->be->pack_refs(refs, opts);
> -}Ah ok, so we are removing `refs_pack_refs()` here in this patch. Maybe we can just squash this change into the previous patch. Probably not a big deal either way.
The other cleanups in this patch look good.
-Justin