All of lore.kernel.org
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Meet Soni <meetsoni3017@gmail.com>
Cc: git@vger.kernel.org,  ps@pks.im,  shejialuo@gmail.com
Subject: Re: [GSoC][PATCH v2 0/5] Add refs optimize subcommand
Date: Mon, 08 Sep 2025 09:41:47 -0700	[thread overview]
Message-ID: <xmqqfrcwyjzo.fsf@gitster.g> (raw)
In-Reply-To: <xmqq348xyr5b.fsf@gitster.g> (Junio C. Hamano's message of "Mon, 08 Sep 2025 07:07:12 -0700")

Junio C Hamano <gitster@pobox.com> writes:

> And when framed this way, I am not sure it is a good direction
> forward to have pack-refs.[ch] top-level files.  I have to wonder if
> the approach should be more along this line?
>
>  - Define the "optimize" action in the refs API.  What it really
>    means to "optimize" may differ from backend to backend.  There
>    may be refs_optimize(struct ref_store *refs) API entry point.
>
>  - Add the new action to the vtable for refs backends.  There may be
>    no action defined for reftable backend for now, or you may find
>    there already are reftable specific optimizations you want to
>    trigger from there.
>
>  - Figure out how this interacts with existing refs_pack_refs();
>    most likely it as the backend specific option, should go away,
>    and its implementation would move to the "optimize" action driven
>    from the vtable for files backend.
>
> Once it is done, you do not necessarily need "git refs optimize",
> but the "git pack-refs" could be the front-end to trigger the more
> generic "optimize" action.  In other words, in a repository whose
> refs are stored in reftable, "git pack-refs" would cease to be a
> no-op but can perform optimizations suitable in that repository.
>
> That way, users do not need to learn a new command, which may be
> also an advantage over what is being proposed here.

I do not have strong opinions between keeping "git pack-refs" and
adding "git refs optimize"; in other words, the UI exposed to
end-user is secondary, so if people prefer the latter, that is fine
by me.

I do care about how the code is structured, though.

Thanks.

  reply	other threads:[~2025-09-08 16:41 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-09-06  7:51 [GSoC][PATCH v2 0/5] Add refs optimize subcommand Meet Soni
2025-09-06  7:51 ` [GSoC][PATCH v2 1/5] builtin/pack-refs: factor out core logic into a shared library Meet Soni
2025-09-06  7:51 ` [GSoC][PATCH v2 2/5] doc: factor out common option Meet Soni
2025-09-08 16:44   ` Junio C Hamano
2025-09-06  7:51 ` [GSoC][PATCH v2 3/5] builtin/refs: add optimize subcommand Meet Soni
2025-09-06  7:51 ` [GSoC][PATCH v2 4/5] t0601: refactor tests to be shareable Meet Soni
2025-09-06  7:51 ` [GSoC][PATCH v2 5/5] t: add test for git refs optimize subcommand Meet Soni
2025-09-08 14:07 ` [GSoC][PATCH v2 0/5] Add " Junio C Hamano
2025-09-08 16:41   ` Junio C Hamano [this message]
2025-09-18  5:46 ` [GSoC][PATCH v3 0/9] " Meet Soni
2025-09-18  5:46   ` [GSoC][PATCH v3 1/9] refs: add a generic 'optimize' API Meet Soni
2025-09-18 10:44     ` shejialuo
2025-09-18 15:39       ` Junio C Hamano
2025-09-18  5:46   ` [GSoC][PATCH v3 2/9] files-backend: implement 'optimize' action Meet Soni
2025-09-18  5:46   ` [GSoC][PATCH v3 3/9] reftable-backend: " Meet Soni
2025-09-18  5:46   ` [GSoC][PATCH v3 4/9] builtin/pack-refs: convert to use the generic refs_optimize() API Meet Soni
2025-09-18 10:43     ` shejialuo
2025-09-18  5:47   ` [GSoC][PATCH v3 5/9] builtin/pack-refs: factor out core logic into a shared library Meet Soni
2025-09-18  5:47   ` [GSoC][GSoC][PATCH v3 6/9] doc: pack-refs: factor out common options Meet Soni
2025-09-18  5:47   ` [GSoC][PATCH v3 7/9] builtin/refs: add optimize subcommand Meet Soni
2025-09-18 16:06     ` Junio C Hamano
2025-09-18  5:47   ` [GSoC][PATCH v3 8/9] t0601: refactor tests to be shareable Meet Soni
2025-09-18  5:47   ` [GSoC][PATCH v3 9/9] t: add test for git refs optimize subcommand Meet Soni
2025-09-19  8:26   ` [GSoC][PATCH v4 0/9] Add " Meet Soni
2025-09-19  8:26     ` [GSoC][PATCH v4 1/9] refs: add a generic 'optimize' API Meet Soni
2025-09-24  6:18       ` Patrick Steinhardt
2025-09-19  8:26     ` [GSoC][PATCH v4 2/9] files-backend: implement 'optimize' action Meet Soni
2025-09-19  8:26     ` [GSoC][PATCH v4 3/9] reftable-backend: " Meet Soni
2025-09-19  8:26     ` [GSoC][PATCH v4 4/9] builtin/pack-refs: convert to use the generic refs_optimize() API Meet Soni
2025-09-19  8:26     ` [GSoC][PATCH v4 5/9] builtin/pack-refs: factor out core logic into a shared library Meet Soni
2025-09-24  6:18       ` Patrick Steinhardt
2025-09-19  8:26     ` [GSoC][PATCH v4 6/9] doc: pack-refs: factor out common options Meet Soni
2025-09-19  8:26     ` [GSoC][PATCH v4 7/9] builtin/refs: add optimize subcommand Meet Soni
2025-09-19  8:26     ` [GSoC][PATCH v4 8/9] t0601: refactor tests to be shareable Meet Soni
2025-09-19  8:26     ` [GSoC][PATCH v4 9/9] t: add test for git refs optimize subcommand Meet Soni
2025-09-19 18:43     ` [GSoC][PATCH v4 0/9] Add " Junio C Hamano

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=xmqqfrcwyjzo.fsf@gitster.g \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --cc=meetsoni3017@gmail.com \
    --cc=ps@pks.im \
    --cc=shejialuo@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.