🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: linux.kernel.git
Article #4169

[PATCH 0/5] builtin/multi-pack-index: remove global state

#4169
From: Justin Tobler
Date: Mon, 30 Nov 2026 21:54
53 lines
12313 bytes
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
Technical Details
Message-ID: <cover.1796075503.git.jltobler@gmail.com>
Path: mbox-mo1.pugleaf.net!srv.newsdeef.eu!news.mb-net.net!open-news-network.org!2.eu.feeder.erje.net!feeder.erje.net!feeder2.feed.ams11.usenet.farm!feeder4.usenet.farm!feeder1.feed.ams11.usenet.farm!feed.usenet.farm!feeder.usenetexpress.com!tr3.eu1.usenetexpress.com!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!git+bounces-76733-linux-kernel-git=dewy.ru

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!srv.newsdeef.eu!news.mb-net.net!open-news-network.org!2.eu.feeder.erje.net!feeder.erje.net!feeder2.feed.ams11.usenet.farm!feeder4.usenet.farm!feeder1.feed.ams11.usenet.farm!feed.usenet.farm!feeder.usenetexpress.com!tr3.eu1.usenetexpress.com!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!git+bounces-76733-linux-kernel-git=dewy.ru
From: jltobler@gmail.com (Justin Tobler)
Newsgroups: linux.kernel.git
Subject: [PATCH 0/5] builtin/multi-pack-index: remove global state
Date: Mon, 30 Nov 2026 15:54:56 -0600
Organization: Usenet Network
Message-ID: <cover.1796075503.git.jltobler@gmail.com>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
Injection-Info: usenet.network; logging-data="1548949"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:8OZUpjvKLMW4io4i+vy/siW5B8Q= sha256:HFUQ5D7hCldGgliC5VQ0pU1ZeRmPV2g+Xfk/odKPEI0= sha1:zxik09QHfsBDCm7bBSsRNK6imtA= sha256:zbPsHfDQFNP6H9jSPxK5Ncjx+sWVMfOxgJGEc0GUxaM=
List-ID: <git.vger.kernel.org>
X-Mailpost-Empty-Hdrs: X-Spam-Level
X-Received: from localhost (localhost [127.0.0.1]) by mail.dewy.ru (Postfix) with ESMTP id 91FF4126017; Tue,  1 Dec 2026 00:58:58 +0300 (MSK)
X-Virus-Scanned: Debian amavisd-new at usenet.network
X-Spam-Flag: NO
X-Spam-Score: -1.949
X-Spam-Status: No, score=-1.949 tagged_above=-9999 required=6.31 tests=[DCC_CHECK=1.1, DCC_REPUT_70_89=0.1, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.001, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249, MAILING_LIST_MULTI=-1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001] autolearn=ham autolearn_force=no
X-Authentication-Results: mail.dewy.ru (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com
X-Received: from mail.dewy.ru ([127.0.0.1]) by localhost (mail.dewy.ru [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id t30hCGXwxGNH; Tue,  1 Dec 2026 00:58:55 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.234.253.10; helo=sea.lore.kernel.org; envelope-from=git+bounces-76733-linux-kernel-git=dewy.ru@vger.kernel.org; receiver=<UNKNOWN>
X-Authentication-Results: OpenDMARC; dmarc=fail (p=none dis=none) header.from=gmail.com
X-Received: from sea.lore.kernel.org (sea.lore.kernel.org [172.234.253.10]) by mail.dewy.ru (Postfix) with ESMTPS id 2F25412600E; Tue,  1 Dec 2026 00:58:46 +0300 (MSK)
X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92]) by sea.lore.kernel.org (Postfix) with ESMTP id 0C9762A6F7; Mon, 30 Nov 2026 21:58:45 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1
X-ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass; t=1796075924; b=q7bpDpADHcjDhUkgRBYcWBIEXxYy/g7/NgW4PwUDgG27a7sRoueSBuPeOBExgdGV+QvP bZssWrY8LBTbjFp/1M+reKhcHQWUCPKfASi4TZSS5UybaYiVxAvHQqN7emRBGX2BwRnKJ WqoaqJbT+EBG09uHnJQaHXeqNs4ceJfNGpgpwwHEMKrhxY1zntifQWjiEWtRDgawB3Pbq +stXnVVBE67q1MGlOl5zNOpVo5so7XJIubVcsK3zIXFZhRZIfSMtwI4eyd4k7GDiXMWCu auZ05A8odCZu1kW8O5cJEF3d+TUV3jEUSIRT4/rhDiy103Vn0bY8toMEXEra/+tqhTQ==
X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796075924; h=X-Original-To:Received:DMARC-Filter:Received:DKIM-Signature: X-Google-DKIM-Signature:X-Gm-Message-State:X-Gm-Gg:X-Received: Received:From:To:Cc:Subject:Date:Message-ID:X-Mailer:X-Mailing-List: List-Id:List-Post:List-Help:List-Subscribe:List-Unsubscribe: List-Owner:Precedence:MIME-Version:Content-Transfer-Encoding; bh=4WLx9tex0ddH1Jgo5zvvmNIQ0LFnIkDK9StwIkwE6O0=; b=Ji7Cc9Kl2Asu7hhxrWPOsEAvqn47TcaJoQJCZZ20UU2ZiIR0ExlTL7N7MgcNhv7yTtbg eIlGje5q9Ycl3O7WC9Hh9HoZrWO9qDTBRLFPf2EKozYzrsU+hwg+t7jA9mNm9rNWR2z3W z+aejWz8tsG1J70sUAkucoEe/gEZ2Ap9I9bWuDhp3pdvJB+B9Wyh+6ugb8AgY1s7GWey6 IVyHrP2epA+WWhVl7geXx0qp4OkP9Aj7vfI9AobjSZpA2oe2Cge5lSyuFJ4ZvwYWsVZUI Mt4FzoDokwPRZBB9SpMIisgHWlgwJUwgBIg+JETZQ8QIvuffS8nBO1Nb04/50fE0NWw==
X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dkim=pass header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20260707 header.b=Q8Cd8TnG; dmarc=pass header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1
X-Received: from localhost.localdomain (localhost [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id A51E0606A330; Mon, 30 Nov 2026 21:58:44 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20260707 header.b=Q8Cd8TnG
X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=209.85.161.47
X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796075923; b=mBWE8BVA1/g8rtPtntLDy19SCg8sfFMmXZSBqpuG1gDiUOZb3hEx2RQRBwU0CVLJsiE3 dI81BCK741urtRN6GURjUUo/bXgJeH/WWYIUraKcgBh2aEbLQ5fM1hJ7S+a3rXktoIBir DqXXA64aTXVIEgYJH7uHVR/E2Fnlh3agfi3EjH/8GvXDX5BRCWn0kpf2EaR+WyMdh/l1U XOIH/2D1jloiZarggRWMd5gNHSLu5d/OlyGjnloDCD1XY62AWC6EVDe07aHjDWDoZCUrX 8LokdxSQocmkpCYVIkoBSd5WtPq+ccbsyXwH4nYZy/Gc4tUC81TIrbe2qkO5gDkYN/Q==
X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796075923; h=DMARC-Filter:Received:DKIM-Signature:X-Google-DKIM-Signature: X-Gm-Message-State:X-Gm-Gg:X-Received:Received:From:To:Cc:Subject: Date:Message-ID:X-Mailer:MIME-Version:Content-Transfer-Encoding; bh=4WLx9tex0ddH1Jgo5zvvmNIQ0LFnIkDK9StwIkwE6O0=; b=kwUAsb1vLLg4pMO0s1ZRXF/1TzSb/JilgpnIS591aRMvdm0zjLNbOOS7gkIQ4eLMmA6f rJxnBF8a2fSduAUJej6Yyd4KnD+i6VdzkxzvA47d35p7vUsH8VEmtfv8z9U1FxcNMSwt9 TQaYJNJE9kqXuKKasdBAmPfPZb8cmPGw0hlF1T1Mt2g7ZW9zIoZ3Nnl39v6tS62Tii1/J jskuKGizNom2MLb+Q53TjkrtgCsxviGlCxp/p32B4MIhXk5qf3kt1F33Ln4mhdllcNozm 1ZYGMph5Swj5mrBKf+aZ8QMIxdP/7ncCYmLAQq4tZorPj/1lBL7LFQc0pxKGpipYe6g==
X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20260707 header.b=Q8Cd8TnG; arc=none smtp.remote-ip=209.85.161.47
X-Received: from mail-oo1-f47.google.com (mail-oo1-f47.google.com [209.85.161.47]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 77808606A31A for <git@vger.kernel.org>; Mon, 30 Nov 2026 21:58:43 +0000 (UTC)
X-DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 77808606A31A
X-Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com
X-Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com
X-Received: by mail-oo1-f47.google.com with SMTP id 006d021491bc7-71ab5e64742so6682360eaf.3 for <git@vger.kernel.org>; Mon, 30 Nov 2026 13:58:43 -0800 (PST)
X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20260707; t=1796075922; x=1796680722; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to:content-type; bh=4WLx9tex0ddH1Jgo5zvvmNIQ0LFnIkDK9StwIkwE6O0=; b=Q8Cd8TnGRt/dQMLEzfL48Z3mDUqw/jriE5bBaJCEfJkHneX6QPBqW4hgB6sJJ1RiXv V84auRGxWB7BPYUYh2fS4fCKQ9L3D6vx963VNQ5xeWo1d5oSXsSo9tNQpBTPLsnxoRDf DZaV/40uirWbVYDJ2q27pyK1WvdbYsfbf/z8CwenjR0yAzFbgL81K1UxUJf/udyN5Q5w D6QLvdJ+zkrQum30Mh4c0TjlPg+PflfokKFX+FBwa8ia0ROs0soaMbWiQgddAYmv+S6/ m0HAgp3B+XIRXNjLniRFRBIsEI2UiJroHjpkOXAN19XQlN2i7RcvFEj0432KTLraoafv XjFQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1796075922; x=1796680722; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to:content-type; bh=4WLx9tex0ddH1Jgo5zvvmNIQ0LFnIkDK9StwIkwE6O0=; b=qfSytpcYGxDtbvwj/Jrnr4Tcnb4nEWfXUHIl+i5fNiGjLK0gkd2HN1octlrHmEtFxi CxfEN0nbliQ0cAgiDdznisbo8kWCW9yD5xj5Gq4UVLv57815nM/APtBRL7yc8QMGsrGm VTkZIkMiJKjpLP4Sbrwr9xvku7kWofC/XUD6MJ2Tlb8UPPXDUL6suHYSznbDrleTm85g 64d+Nwk8Njsa3gjafYkt4My7hcqpE3OE2JsXATLivVWmIbZ/jqrhQmrJ5sxqAL8YCc4P 2I66ZyoZcv6/D/ZrJatPtoLzRdq23gXFYb739znIdpcaLii59xgOpuv93u22L6RY/8em NfeQ==
X-Gm-Message-State: APuU4Z+uwiWeZj7sHuos9bq/KQsT2BsodNim4wo8+bGu7hJcnsk8mZux JDChZjvQ4Vhl92KpqBPLZ+Bfzu2u6PkEgb3u6Won7jX5dRbEyAYrcViAPcl4BQ==
X-Gm-Gg: AZFdTZe0caDQkvYpYYmVSUSz2xpSs83Vwr5BhxafR9JqA2hVILJdf/gbAbdFgjEwhqG sYMwxlN9ENCaIqm4qmRSAj1h8+pMTFrGdfmCjNOsKmMleTu/+CI28Nf3OlUmS/LnCaQEzl4G3As CDdyAsXVFP6o6uLOd6jF4aaOYb9cN3X0TRbcj+8H/or32wTT2EFxHG07k/jtkUU144B0G2OrKgz gzf4H6ggYfrDSBW+q1pg/GzcfryC31k9vyAgkJ+BuWtU+XGgNjHuXhZcp1JiAqHymLz4olA3kSz tyIG8pKqvArL3XVwwk9Lo1Gb3XUjUAjAgZLQ02/JE4KzVbtTAv1DbTw/d8ldGFXC1zHQ8x+3xfG 2QLT41P6Ndx0zPuwLApK62+Xe8WFAGrCi+sS4yFspZjWjeckUD9mQtRRlMW/hu3MFjaZf4vaqMR bcy8R95MU8oI3t0+n5IfaE/BYBlmTftexUI139/MIwPev7j3k7QNP6PJg5nx8OZeRnRSh5uQuQD nhDMgNAVW+fySrUciexCvSgqfB5CAbFDqQiAta5gvvwQi8tWlkx+PxBARm7+MydUV3T7j+NNIKm Xe2b4hH8EYbQ7QHCO6Rv9laI8p2pzh3M3eCIRQ7jJmgScCXREO53sTmVFvb5+Ef1ypru/Ouak7k Ky0AcuAVR/d6Z
X-Received: by 2002:a05:6820:f033:b0:6de:66e3:a1e6 with SMTP id 006d021491bc7-71b3e71b5d7mr27448204eaf.11.1796075922332; Mon, 30 Nov 2026 13:58:42 -0800 (PST)
X-Received: from jtobler--20250820-SHC54.localdomain ([136.51.44.64]) by smtp.gmail.com with ESMTPSA id 006d021491bc7-71b37c52ae6sm23479986eaf.0.2026.11.30.13.58.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 Nov 2026 13:58:41 -0800 (PST)
X-Cc: Justin Tobler <jltobler@gmail.com>
X-Mailer: git-send-email 2.56.0
X-Mailing-List: git@vger.kernel.org
X-List-Post: <mailto:git@vger.kernel.org>
X-List-Help: <mailto:git+help@vger.kernel.org>
X-List-Subscribe: <mailto:git+subscribe@vger.kernel.org>
X-List-Unsubscribe: <mailto:git+unsubscribe@vger.kernel.org>
X-List-Owner: <mailto:git+owner@vger.kernel.org>
X-Precedence: list