git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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
Previous: Karthik NayakNext: Karthik Nayak
Message 9 of 14 in “refs: cleanup code around optimizations”
  1. 0/4 refs: cleanup code around optimizationsKarthik Nayak, Oct 15, 2025
  2. 1/4 refs: move to using the '.optimize' functionsKarthik Nayak, Oct 15, 2025
  3. Justin ToblerOct 15, 2025
  4. Patrick SteinhardtOct 16, 2025
  5. Karthik NayakOct 16, 2025
  6. Patrick SteinhardtOct 16, 2025
  7. Karthik NayakOct 16, 2025
  8. 2/4 refs: cleanup code around optimizationKarthik Nayak, Oct 15, 2025
  9. Justin ToblerOct 15, 2025
  10. 3/4 refs: rename 'pack_refs_opts' to 'refs_optimize_opts'Karthik Nayak, Oct 15, 2025
  11. Justin ToblerOct 15, 2025
  12. Karthik NayakOct 16, 2025
  13. 4/4 t/pack-refs-tests: move the 'test_done' to calleesKarthik Nayak, Oct 15, 2025
  14. Patrick SteinhardtOct 16, 2025

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.