Git development
 help / color / mirror / Atom feed
* [PATCH 0/5] builtin/multi-pack-index: remove global state
@ 2026-11-30 21:54 Justin Tobler
  2026-11-30 21:54 ` [PATCH 1/5] builtin/multi-pack-index: resolve default object directory lazily Justin Tobler
                   ` (5 more replies)
  0 siblings, 6 replies; 22+ messages in thread
From: Justin Tobler @ 2026-11-30 21:54 UTC (permalink / raw)
  To: git; +Cc: Justin Tobler

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


^ permalink raw reply	[flat|nested] 22+ messages in thread

end of thread, other threads:[~2026-12-01 18:19 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-30 21:54 [PATCH 0/5] builtin/multi-pack-index: remove global state Justin Tobler
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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox