All of lore.kernel.org
 help / color / mirror / Atom feed
From: Justin Tobler <jltobler@gmail.com>
To: git@vger.kernel.org
Cc: Justin Tobler <jltobler@gmail.com>
Subject: [PATCH 0/5] builtin/multi-pack-index: remove global state
Date: Mon, 30 Nov 2026 15:54:56 -0600	[thread overview]
Message-ID: <cover.1796075503.git.jltobler@gmail.com> (raw)

Greetings,

This series cleans up git-multi-pack-index(1) by getting rid of
`the_repository` and the global state used to track its options. Each
subcommand now parses its options into a local structure, and the common
options are wired up via a macro instead of allocating a combined
options array for every subcommand.

The main reason the options are global is that "--object-dir=" and
"--[no-]progress" are also accepted before the subcommand, where the
top-level builtin parses them into the same global state used by the
subcommands. Patch 3 drops support for giving these options before the
subcommand, as every subcommand already accepts both of them.

The "--[no-]progress" option was previously removed as a top-level
option in 0394f8d002 (builtin/multi-pack-index.c: disable top-level
--[no-]progress, 2021-09-20) and appears to have been inadvertently
reintroduced via 6b8fb17490 (builtin/multi-pack-index.c: make
'--progress' a common option, 2026-02-24). So I think it should be fine
to drop.

While "--object-dir=" has never previously been dropped, it appears to
exist as a top-level option for the same historical reason, from when
all options were parsed by the top-level builtin. Since the subcommands
already parse the common options themselves, it should ideally be
dropped as well. If we want to keep this top-level option though, an
alternative could be to propagate the option argument to each
subcommand. In this case, I don't think it's worth it, but happy to
change if others feel differently.

This series is built on top of 86e79b2795 (The 26th batch, 2026-11-29).

Thanks,
-Justin

Justin Tobler (5):
  builtin/multi-pack-index: resolve default object directory lazily
  builtin/multi-pack-index: get rid of `the_repository`
  builtin/multi-pack-index: drop top-level options
  builtin/multi-pack-index: simplify how common options are wired up
  builtin/multi-pack-index: de-globalize options handling

 Documentation/git-multi-pack-index.adoc |  12 +-
 builtin/multi-pack-index.c              | 160 +++++++++++-------------
 t/lib-midx.sh                           |   2 +-
 t/t5319-multi-pack-index.sh             |  32 ++---
 4 files changed, 97 insertions(+), 109 deletions(-)


base-commit: 86e79b2795e3ce3b0ad7685edd368574b0c8b9f2
-- 
2.56.0


             reply	other threads:[~2026-11-30 21:58 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-30 21:54 Justin Tobler [this message]
2026-11-30 21:54 ` [PATCH 1/5] builtin/multi-pack-index: resolve default object directory lazily Justin Tobler
2026-12-01 10:58   ` Patrick Steinhardt
2026-12-01 16:39     ` Justin Tobler
2026-11-30 21:54 ` [PATCH 2/5] builtin/multi-pack-index: get rid of `the_repository` Justin Tobler
2026-12-01 10:58   ` Patrick Steinhardt
2026-12-01 16:46     ` Justin Tobler
2026-11-30 21:54 ` [PATCH 3/5] builtin/multi-pack-index: drop top-level options Justin Tobler
2026-12-01 10:58   ` Patrick Steinhardt
2026-12-01 17:11     ` Justin Tobler
2026-11-30 21:55 ` [PATCH 4/5] builtin/multi-pack-index: simplify how common options are wired up Justin Tobler
2026-12-01 10:58   ` Patrick Steinhardt
2026-12-01 17:13     ` Justin Tobler
2026-11-30 21:55 ` [PATCH 5/5] builtin/multi-pack-index: de-globalize options handling Justin Tobler
2026-12-01 10:59   ` Patrick Steinhardt
2026-12-01 17:18     ` Justin Tobler
2026-12-01 18:16 ` [PATCH v2 0/5] builtin/multi-pack-index: remove global state Justin Tobler
2026-12-01 18:16   ` [PATCH v2 1/5] builtin/multi-pack-index: resolve default object directory lazily Justin Tobler
2026-12-01 18:16   ` [PATCH v2 2/5] builtin/multi-pack-index: get rid of `the_repository` Justin Tobler
2026-12-01 18:16   ` [PATCH v2 3/5] builtin/multi-pack-index: drop top-level options Justin Tobler
2026-12-01 18:16   ` [PATCH v2 4/5] builtin/multi-pack-index: simplify how common options are wired up Justin Tobler
2026-12-01 18:16   ` [PATCH v2 5/5] builtin/multi-pack-index: de-globalize options handling Justin Tobler

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=cover.1796075503.git.jltobler@gmail.com \
    --to=jltobler@gmail.com \
    --cc=git@vger.kernel.org \
    /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.