From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=209.85.161.47 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== 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== 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 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 ; Mon, 30 Nov 2026 21:58:43 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 77808606A31A Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com 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 Received: by mail-oo1-f47.google.com with SMTP id 006d021491bc7-71ab5e64742so6682360eaf.3 for ; Mon, 30 Nov 2026 13:58:43 -0800 (PST) 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) 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) From: Justin Tobler To: git@vger.kernel.org Cc: Justin Tobler Subject: [PATCH 0/5] builtin/multi-pack-index: remove global state Date: Mon, 30 Nov 2026 15:54:56 -0600 Message-ID: X-Mailer: git-send-email 2.56.0 X-Mailing-List: git@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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