From mboxrd@z Thu Jan  1 00:00:00 1970
Received: from mail-pf1-f171.google.com (mail-pf1-f171.google.com [209.85.210.171])
	(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
	(No client certificate requested)
	by smtp.subspace.kernel.org (Postfix) with ESMTPS id 8BD261DE2C9
	for <git@vger.kernel.org>; Sun,  6 Jul 2025 21:41:14 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.171
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
	t=1751838075; cv=none; b=pkMPYRtp/ofWuYApAo+6v7tN/h7cl+HUdCVRj5u7x2wYBauZh8P0k4SUiMwJzUn3ShpceuaC0Q50Oz3aX9uKQDjPrPDbIug+pLVwLjR6ywuQrrzuNpjLuvs3VvY9Ktgis7iqeYWmTtNRJVdoKxuG2UhaDf/IAZcJd8xjy8M/0/8=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
	s=arc-20240116; t=1751838075; c=relaxed/simple;
	bh=t3Pb3+RRMBRe60o58lpdvDdPfNoyE10b181ECcPvQGc=;
	h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=lqTTZ1Acy2ynUNwg9MQQPfokpCaBsLEMxvxONLnAlhpWdy4o7RgV4WlcFfUp9riRewmcD2kk6YTAp5LJlY4CdtzbQYvLgKeALPcEvw3wzco/pJBHUmF7p6Cn98sRyCHZ65PMOxQeMAFjp8WGC6xetFbzNMWQUDVXFZfpgyy0XJQ=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=OY+PCi5K; arc=none smtp.client-ip=209.85.210.171
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.b="OY+PCi5K"
Received: by mail-pf1-f171.google.com with SMTP id d2e1a72fcca58-748d982e92cso1448165b3a.1
        for <git@vger.kernel.org>; Sun, 06 Jul 2025 14:41:14 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=20230601; t=1751838074; x=1752442874; 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;
        bh=+o7e9aUGd5CHnAXuiSt0egaqRrT1oB/2k0TRu0zie/k=;
        b=OY+PCi5KxaPScPiNyex2cPHZ0tNMbIwIDSQEbdH1F7seV8Yjqcjm2WKB/U3gjlikbW
         ab/55sVzEdrG+YzAoKwzEE/ZTZ7Qs4N4F6X2cXJ987l04v0i+1kHQ02HrlCbiyYZrGy8
         uGnkiiohoFVcu0qRHj59Jh1THw7R3QTS2FZIF7rPXXQiDwnmZqzKXbnK44aGgaOtmmZi
         21KOAxam7+/GeXEfYdXBIS9HkehQHHDTHky5Ey+jyT9BiEPgkYTib6XyXJ1xBgBkP0U+
         pMNix4X/SYe+p74Ah3IKZBf75RT7awoOil1g/IRH56mIUgmKSu7pWO9NBAVRoxPiJsMs
         gwGA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20230601; t=1751838074; x=1752442874;
        h=content-transfer-encoding:mime-version:message-id:date:subject:cc
         :to:from:x-gm-message-state:from:to:cc:subject:date:message-id
         :reply-to;
        bh=+o7e9aUGd5CHnAXuiSt0egaqRrT1oB/2k0TRu0zie/k=;
        b=AKgdNEKWBQN/RJ6i79CP2uJ/wjTbAyfxpnmeZBV1w4ydrmo4a3zPxhPVhz8GJEMEZP
         T+om4PcCUTUlNXjunV21M+EI2sSEkCQdPK0i/W22Bni41q7BNOr7+RtaYcIVD69oZFSH
         gvsr7XNvpzG5d85DlAZ6qWGtPHFrLxOmzPE1s6UbLBCMzAkHtQwwa0Q5jLbmBMRcWDB0
         /fkAGNNGCb2lKDEYRSpjFS98MkYCRbTFzag2oYVgJwOM+UfkqwI9cEk+pbeIXxiGTrTP
         Ge6Lf1S//E5le9dbAwFD1tUcReksdT6nzYrINrVdPOh3irnz8+gPna9/ue5DbLST6Ri9
         xWKA==
X-Gm-Message-State: AOJu0YyAi1a5f8zb6BY7N2wJWQfM2uMHQYrUla4NsuuwmeNiW0l5vGqT
	A+oguN4LamhoYZihkd6AUhht/qxh/ifcjBBs7ZAlRSHNg0Uuf37r3hv6X9PwFHzvcrs=
X-Gm-Gg: ASbGnctu0uyKkiz9JehhSbd+TrcaJL3b+Z7Hbf6aG4RDrTMCy4EsA34uHLPRIiC96uu
	EM6OL2eH49XeHqO+rKJifM/vHiyiDuBRkq+nBAdjVKdQyZtFnlV0afgs/ajlraAJHihQCti+7rC
	ELSvMPqJk4nfGgmmYUs6pY0HhHq+G3zdC+4gVROvv8zT8fFomlZJT5DWZZIB/9ulY5iEVM83MD2
	uNAkfkcoLcAYwLzqkN/STbOSUTsFQi8qLMzYRGF4L8uhndpX+8B5EF6jNQKmnbKh1jloHeYPl6V
	O4U96mgoNOCZLkCVpe2SwO/E4pOFc1aoXFfNF8rwPv1iD5Q8qfNmfAzBxfTnhz/UDuH8ZrBPUGB
	lYx2UPHKu/z0=
X-Google-Smtp-Source: AGHT+IFTpyAjE7KdRSrhNv7LFli9h0MGW+GiVPvZyQRV6UGXyyH1aR3oWGn+hk6SRxgNR+Gia7xcWQ==
X-Received: by 2002:a05:6a21:48d:b0:220:1215:fea7 with SMTP id adf61e73a8af0-2271ebd9084mr9388767637.9.1751838073663;
        Sun, 06 Jul 2025 14:41:13 -0700 (PDT)
Received: from archlinux.plaksha.edu.in ([202.164.41.66])
        by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-b38ee60c55csm7363968a12.43.2025.07.06.14.41.10
        (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
        Sun, 06 Jul 2025 14:41:13 -0700 (PDT)
From: Usman Akinyemi <usmanakinyemi202@gmail.com>
To: git@vger.kernel.org
Cc: ps@pks.im,
	chriscool@tuxfamily.org,
	christian.couder@gmail.com,
	gitster@pobox.com,
	me@ttaylorr.com,
	usmanakinyemi202@gmail.com
Subject: [PATCH v2 0/7] move builtin help test to t1517
Date: Mon,  7 Jul 2025 03:11:01 +0530
Message-ID: <20250706214108.714499-1-usmanakinyemi202@gmail.com>
X-Mailer: git-send-email 2.50.0
Precedence: bulk
X-Mailing-List: git@vger.kernel.org
List-Id: <git.vger.kernel.org>
List-Subscribe: <mailto:git+subscribe@vger.kernel.org>
List-Unsubscribe: <mailto:git+unsubscribe@vger.kernel.org>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit

In patch series which contain this
"[*]: 43a8391977 (builtin/verify-tag: stop using `the_repository`, 2025-03-07)"
and some other builtin commands, the help test was added into their
respective test files. Since it better fits thats tests that check
command behavior outside a repository should be in t/t1517-outside-repo.sh.
Patrick suggest moving the test to t/t1517-outside-repo.sh.

This patch series moved the all the test.

Changes since v1:
  - Fix some typo

Usman Akinyemi (7):
  t/t1517: move checkout-index -h test to t1517
  t/t1517: move for-each-ref -h test to t1517
  t/t1517: move ls-files -h test to t1517
  t/t1517: move pack-refs -h test to t1517
  t/t1517: move send-pack -h test to t1517
  t/t1517: move verify-commit -h test to t1517
  t/t1517: move verify-tag -h test to t1517

 t/t0610-reftable-basics.sh      |  7 -----
 t/t1517-outside-repo.sh         | 49 +++++++++++++++++++++++++++++++++
 t/t2006-checkout-index-basic.sh |  7 -----
 t/t3004-ls-files-basic.sh       |  7 -----
 t/t5400-send-pack.sh            |  7 -----
 t/t6300-for-each-ref.sh         |  7 -----
 t/t7030-verify-tag.sh           |  7 -----
 t/t7510-signed-commit.sh        |  7 -----
 8 files changed, 49 insertions(+), 49 deletions(-)

-- 
2.50.0


From mboxrd@z Thu Jan  1 00:00:00 1970
Received: from mail-pg1-f180.google.com (mail-pg1-f180.google.com [209.85.215.180])
	(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
	(No client certificate requested)
	by smtp.subspace.kernel.org (Postfix) with ESMTPS id 067E82BCF4D
	for <git@vger.kernel.org>; Sun,  6 Jul 2025 21:41:17 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.215.180
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
	t=1751838079; cv=none; b=H1jzXiyVBTiYtammvJAUaG93A38Bzs1aI6O31mg1oASUDUZlpeS20Tt//fxfcB9ovjR43wQRg/Inx17ZCulub9X+325I2Zf8LT0IRjtX06RIfBPO4zFa10udpGbZ7f4SlNl1s3LECePsTq4v0nTDD7TEkhAl901zZTC8//TBj+w=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
	s=arc-20240116; t=1751838079; c=relaxed/simple;
	bh=Wxpfx0SJUKa6J17R3++gOKIZyxEG3mAOZTG+HsmIog4=;
	h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References:
	 MIME-Version; b=IYyFtPCSXUHRdbT0/Jm5BxHLNw8DbnVeabkriVbmJDlq7yXJrNOKY0CIA/KWRbdkEfR7qfBUShEhUc7tbDnZP5o7XrgUxgZKu5I1CVYveR/Ut4Cz9n/ord2DIIJ3PiPMOym/Nx2scpobd8KP+9lL2LBJVri6nhMB9S966o7ls/Q=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=UytSiIME; arc=none smtp.client-ip=209.85.215.180
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.b="UytSiIME"
Received: by mail-pg1-f180.google.com with SMTP id 41be03b00d2f7-b34a78bb6e7so1665927a12.3
        for <git@vger.kernel.org>; Sun, 06 Jul 2025 14:41:17 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=20230601; t=1751838077; x=1752442877; darn=vger.kernel.org;
        h=content-transfer-encoding:mime-version:references:in-reply-to
         :message-id:date:subject:cc:to:from:from:to:cc:subject:date
         :message-id:reply-to;
        bh=dJOI6HgiPGraAU45KBdwd4Xa3NlBPbAtWRCajr1UXSc=;
        b=UytSiIMED5+QSVInQkSe+ml5/wKmdjsD+u38nKYUfSLKCZX4La89ep17/Yu1eQLCUk
         v6zxEcIrIT+Ht0eN5K9PL6j8JFyLUFQFQD5ugu1i4Pefz0xUeZoCm8tp2mg9Af2d4ePM
         GSGzKLIB3kAd1SdIn8jSd1n2koHQGdHymzM+bA4FSfJmMXkpy3Ac/JLjfl08Aj+zrlmM
         lXVs/O3kINoHYBbSM8ukaQCNWeZ1i82cJ+Kadwgu8pmNXb3hqyGTr50o/Lw3H5idWgBr
         2g7pKSPkzzphldEh/TVtRIYpXZXDdDEJtae4sRr/SFJzJLzhQHzgM4tYWSNW4rpk1Rqa
         t8Fg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20230601; t=1751838077; x=1752442877;
        h=content-transfer-encoding:mime-version:references:in-reply-to
         :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc
         :subject:date:message-id:reply-to;
        bh=dJOI6HgiPGraAU45KBdwd4Xa3NlBPbAtWRCajr1UXSc=;
        b=rCJxpyLUYcAeSC4EO0rVhFbkLXixtjfMXO5PUuxwFkeC9l90/+wiQVpHoD2QecqBQ8
         6P+7uJGW9Iw1Wd2xOB55t0eFUxgCkRiQxaOljsLv48LSraM0dc1vw1QDtBA+mnf3bwOk
         Plz7FAsKz4F1Z8374bnTp1qrlZgQUhMcIi/MrgOzpGXuOqiR+tSCjj9luU94Jh5pf3fw
         AL/pPROyMvCED0YIiBfMfO61/z6+x2ekegOOBsDMQ72667+NdgO1RWSWh5m0DWOEl3zL
         5FEWmiy17Q9jNRYXXU3WVtvf2YOnaV9HfvVHjpJ5OFPkOpgNv0zRw3b0F/fBaziv+Qaq
         E1Mw==
X-Gm-Message-State: AOJu0YwtSOc5TPQg/7blt3G/XrX5qUIXbrKUW6ryZbfd+2QUcGU1D/Cx
	EjoUglkVAMPIIHSczgYpP3LF77NX2+sG3CtwR6L+ukTpd5CtCLVog362TmcS9wVS1c0=
X-Gm-Gg: ASbGncv7ytLZodnXUoSYwm5ycRnEhrKIKe4/FXvZsyZN9C80R+y8ciZal17Z+3BjwYD
	GIDhunDZxH/0bb3HScvvijGmELkiXRokY6NtLr02Zrouf6YIb8UDAOo9h6bNpdilYyNtboXUv7u
	kbh2Ara7Wmd0RrOGZQyR18guUQWJNfp2ZpTUUaM2QYfnuqCPYq/0UejDHuSwL6qBcDk/q+MjEmh
	1l2uPK1a/gHGUFvuM6Wvr3XHoNvE4mMeebq2DiYPR4oAneqe/ZQAcdBKgJmbYPYlN0u32PShPaQ
	ezzCbBaioqwGYbXlFHdhbbZd/f6usDVYbZzCYfg9GfVTsqh/ZJtTx6ZCMKGYVurlDhWh0nkWXza
	mkJYWD25YFnY=
X-Google-Smtp-Source: AGHT+IFGAgthsKkJ5p6hQ5cBKcectKNJmSzdkho0Zoib84OkS+dssQVTewt0D9u9Y6LPaDjB04empQ==
X-Received: by 2002:a05:6a21:7a43:b0:223:76d2:5a7 with SMTP id adf61e73a8af0-225b948850fmr16724740637.24.1751838077202;
        Sun, 06 Jul 2025 14:41:17 -0700 (PDT)
Received: from archlinux.plaksha.edu.in ([202.164.41.66])
        by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-b38ee60c55csm7363968a12.43.2025.07.06.14.41.13
        (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
        Sun, 06 Jul 2025 14:41:16 -0700 (PDT)
From: Usman Akinyemi <usmanakinyemi202@gmail.com>
To: git@vger.kernel.org
Cc: ps@pks.im,
	chriscool@tuxfamily.org,
	christian.couder@gmail.com,
	gitster@pobox.com,
	me@ttaylorr.com,
	usmanakinyemi202@gmail.com
Subject: [PATCH v2 1/7] t/t1517: move checkout-index -h test to t1517
Date: Mon,  7 Jul 2025 03:11:02 +0530
Message-ID: <20250706214108.714499-2-usmanakinyemi202@gmail.com>
X-Mailer: git-send-email 2.50.0
In-Reply-To: <20250706214108.714499-1-usmanakinyemi202@gmail.com>
References: <20250706214108.714499-1-usmanakinyemi202@gmail.com>
Precedence: bulk
X-Mailing-List: git@vger.kernel.org
List-Id: <git.vger.kernel.org>
List-Subscribe: <mailto:git+subscribe@vger.kernel.org>
List-Unsubscribe: <mailto:git+unsubscribe@vger.kernel.org>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit

The test 'checkout-index does not crash with -h' checks that
the command exits cleanly with usage information, both inside and
outside of a repository.

Move this test from "t2006-checkout-index-basic.sh" to
"t1517-outside-repo.sh" since it better fits with tests that check
command behavior outside a repository.

Suggested-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Usman Akinyemi <usmanakinyemi202@gmail.com>
---
 t/t1517-outside-repo.sh         | 7 +++++++
 t/t2006-checkout-index-basic.sh | 7 -------
 2 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/t/t1517-outside-repo.sh b/t/t1517-outside-repo.sh
index 6824581317..98a453db58 100755
--- a/t/t1517-outside-repo.sh
+++ b/t/t1517-outside-repo.sh
@@ -114,4 +114,11 @@ test_expect_success 'update-server-info does not crash with -h' '
 	test_grep "[Uu]sage: git update-server-info " usage
 '
 
+test_expect_success 'checkout-index does not crash with -h' '
+	test_expect_code 129 git checkout-index -h >usage &&Add commentMore actions
+	test_grep "[Uu]sage: git checkout-index " usage &&
+	test_expect_code 129 nongit git checkout-index -h >usage &&
+	test_grep "[Uu]sage: git checkout-index " usage
+'
+
 test_done
diff --git a/t/t2006-checkout-index-basic.sh b/t/t2006-checkout-index-basic.sh
index fedd2cc097..bac231b167 100755
--- a/t/t2006-checkout-index-basic.sh
+++ b/t/t2006-checkout-index-basic.sh
@@ -21,13 +21,6 @@ test_expect_success 'checkout-index -h in broken repository' '
 	test_grep "[Uu]sage" broken/usage
 '
 
-test_expect_success 'checkout-index does not crash with -h' '
-	test_expect_code 129 git checkout-index -h >usage &&
-	test_grep "[Uu]sage: git checkout-index " usage &&
-	test_expect_code 129 nongit git checkout-index -h >usage &&
-	test_grep "[Uu]sage: git checkout-index " usage
-'
-
 test_expect_success 'checkout-index reports errors (cmdline)' '
 	test_must_fail git checkout-index -- does-not-exist 2>stderr &&
 	test_grep not.in.the.cache stderr
-- 
2.50.0


From mboxrd@z Thu Jan  1 00:00:00 1970
Received: from mail-pf1-f170.google.com (mail-pf1-f170.google.com [209.85.210.170])
	(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
	(No client certificate requested)
	by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9D12F2BE04B
	for <git@vger.kernel.org>; Sun,  6 Jul 2025 21:41:21 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.170
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
	t=1751838083; cv=none; b=CnxPUi5EEIIU00lBexI6XmyM2jkCv5YppLOjWVD+3KUn3WzTTxGrPO/B0vuQVZn0CmjrvNgIzro3436OqlRv0SAb69GRhE7N+TSomC8iiQLrLOk7K4KuqZvh4DoT5WgPFyWw5UtfAHPjn7ZkT1WOyvzJ3CfVRzF35wd2eXJCMrs=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
	s=arc-20240116; t=1751838083; c=relaxed/simple;
	bh=dy2+NJGSchTWSrEfUVkYakgaTxZXNpF3vmFysG+xB9A=;
	h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References:
	 MIME-Version; b=mk80l7t1y4m/2Ey8fzYYjJVGVtnn8Azbv/jDR5pOEkVfzHBZ7+RIsG16lJm2KNQVg3epBDCQTh1IwjmaN9ySCn4ecERxOQ0QDDR4L3wrL0I2LJT12PzMdqNpuqU5tvnxnXqL1dSkrx+HeupmKkOePyv6HrNDmeQmqSK10yqbqxM=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=T4ILmcbf; arc=none smtp.client-ip=209.85.210.170
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.b="T4ILmcbf"
Received: by mail-pf1-f170.google.com with SMTP id d2e1a72fcca58-73972a54919so2100987b3a.3
        for <git@vger.kernel.org>; Sun, 06 Jul 2025 14:41:21 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=20230601; t=1751838081; x=1752442881; darn=vger.kernel.org;
        h=content-transfer-encoding:mime-version:references:in-reply-to
         :message-id:date:subject:cc:to:from:from:to:cc:subject:date
         :message-id:reply-to;
        bh=fhSw9iK/XJJzbmXSFpcqY1YVf6vcxjoslpXI9bdxXmA=;
        b=T4ILmcbfBqUsgDr5IryczChBTE3nDNS9A03U3hw4GRDIfGgBjJRgJUyB4CG1VMDtyT
         1/9oDT3q1+dWrvgN9qjPWRzORxOJuJXGd6Tc1s4M9kzr1tL5xU2PdOoqsCtEbaVd9jVn
         WeG0iSyIqpAbWx07NmHJuoCDZ0Bxo3H3y0e70Dpnh6LqMguW9v5ODHfYm3S55Qt520/k
         KC7cw7UsDXKdcuxtGE6FdkhnRN/bDdudOkP7CZQjjOVPHaOeCKdyxBNhSiUmF27eotL0
         ayc1d9pnQikWMrq9PbRVov+JMMxPcaXHm4HkYgp1dzjTnY2GFPFNwcTUL94fn7wLu5lt
         erEA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20230601; t=1751838081; x=1752442881;
        h=content-transfer-encoding:mime-version:references:in-reply-to
         :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc
         :subject:date:message-id:reply-to;
        bh=fhSw9iK/XJJzbmXSFpcqY1YVf6vcxjoslpXI9bdxXmA=;
        b=b8oa3OHDHR5AoRZmkuTK69N8/QUGZcT8ay+w/HpEcnXXorqNWPxbRYQSesoJ4bOY2A
         dLGvSoTLqwwsRO5t9M4R9WOBit7dBdS6TfcfdMD0w0cPXfSOIErL6a2FYUaIFTEKZRAh
         Fgh1Lmb0dvl8Y0yfWL8IGQKBAaQvn6yCfR3KE1IcXc6HsWmRcJzUEPBBAGu5CnYvSJdT
         x+AyKimcxY4XkGgLL4bPw8KdYOEHVwgKuHphk+o6zfW1+wjz1qOWMJZzn9rlbi65CNAR
         fuVGSsRWcgVlai6t/tWnQTAx5bi3uAZlkWC3Ye7T03FexY2ps7HM1NqKB7lKUJkRQAX/
         FsRg==
X-Gm-Message-State: AOJu0YwcrUTFTjpSMzIBMhPipRbgMnM2uzcHzH5sHvmVyve/jUcOv2OP
	iDrBJQXLP3nPYBEFxXhkjUsLBInNSzIl8bLNTNqXOOD4YB78fKOOlBuNafdyN1ifhMY=
X-Gm-Gg: ASbGncsicbc4VvcQAiFMTokX3rMUR6pS5rtVxSwJYosq+ZbU77ZhLhFIIoDwfrQ2Lds
	MU+9XN/+c++iphb2tnBubCPSYtC4yp5uDErPmfqFfpggiDdjyfbgmhntHCtqTdjZRNb/dZSMqw3
	aw/g8cjuvSZF2fvTtWtQlKDSt5Gv/5IxFDulPm29ilRfOG+rRfC/nno5oTbchqjvRn6VBfcYcNU
	jrTx5kpENhZZhVkO7gv4HmITa2pr/gUqKBG4UjQfLij8dTOAgJU/11fU10QaM+zrUb4J97oIxgl
	HpePc9Tl62NtVU31jwZcvWW3FpMXlxbj/D/7SYGRxC19BX1nSr0/R6aIanw+Ptpw39ZsdBSdDGh
	PRJxdjLIzeqQ=
X-Google-Smtp-Source: AGHT+IGHbSRKUHwpu21ZCdfgkJ/PgeZp6jYS2Ebt2qMKqfOYo9h+6ABIRBoRi9JX1j0S6w7RWoGRzw==
X-Received: by 2002:a05:6a00:21ca:b0:739:50c0:b3fe with SMTP id d2e1a72fcca58-74ce8842197mr15961958b3a.8.1751838080766;
        Sun, 06 Jul 2025 14:41:20 -0700 (PDT)
Received: from archlinux.plaksha.edu.in ([202.164.41.66])
        by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-b38ee60c55csm7363968a12.43.2025.07.06.14.41.17
        (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
        Sun, 06 Jul 2025 14:41:20 -0700 (PDT)
From: Usman Akinyemi <usmanakinyemi202@gmail.com>
To: git@vger.kernel.org
Cc: ps@pks.im,
	chriscool@tuxfamily.org,
	christian.couder@gmail.com,
	gitster@pobox.com,
	me@ttaylorr.com,
	usmanakinyemi202@gmail.com
Subject: [PATCH v2 2/7] t/t1517: move for-each-ref -h test to t1517
Date: Mon,  7 Jul 2025 03:11:03 +0530
Message-ID: <20250706214108.714499-3-usmanakinyemi202@gmail.com>
X-Mailer: git-send-email 2.50.0
In-Reply-To: <20250706214108.714499-1-usmanakinyemi202@gmail.com>
References: <20250706214108.714499-1-usmanakinyemi202@gmail.com>
Precedence: bulk
X-Mailing-List: git@vger.kernel.org
List-Id: <git.vger.kernel.org>
List-Subscribe: <mailto:git+subscribe@vger.kernel.org>
List-Unsubscribe: <mailto:git+unsubscribe@vger.kernel.org>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit

The test 'for-each-ref does not crash with -h' checks that
the command exits cleanly with usage information, both inside and
outside of a repository.

Move this test from "t6300-for-each-ref.sh" to
"t1517-outside-repo.sh" since it better fits with tests that check
command behavior outside a repository.

Suggested-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Usman Akinyemi <usmanakinyemi202@gmail.com>
---
 t/t1517-outside-repo.sh | 7 +++++++
 t/t6300-for-each-ref.sh | 7 -------
 2 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/t/t1517-outside-repo.sh b/t/t1517-outside-repo.sh
index 98a453db58..92ad159b58 100755
--- a/t/t1517-outside-repo.sh
+++ b/t/t1517-outside-repo.sh
@@ -121,4 +121,11 @@ test_expect_success 'checkout-index does not crash with -h' '
 	test_grep "[Uu]sage: git checkout-index " usage
 '
 
+test_expect_success 'for-each-ref does not crash with -h' '
+	test_expect_code 129 git for-each-ref -h >usage &&
+	test_grep "[Uu]sage: git for-each-ref " usage &&
+	test_expect_code 129 nongit git for-each-ref -h >usage &&
+	test_grep "[Uu]sage: git for-each-ref " usage
+'
+
 test_done
diff --git a/t/t6300-for-each-ref.sh b/t/t6300-for-each-ref.sh
index ce9af79ab1..5db7038c41 100755
--- a/t/t6300-for-each-ref.sh
+++ b/t/t6300-for-each-ref.sh
@@ -292,13 +292,6 @@ test_expect_success 'Check invalid atoms names are errors' '
 	test_must_fail git for-each-ref --format="%(INVALID)" refs/heads
 '
 
-test_expect_success 'for-each-ref does not crash with -h' '
-	test_expect_code 129 git for-each-ref -h >usage &&
-	test_grep "[Uu]sage: git for-each-ref " usage &&
-	test_expect_code 129 nongit git for-each-ref -h >usage &&
-	test_grep "[Uu]sage: git for-each-ref " usage
-'
-
 test_expect_success 'Check format specifiers are ignored in naming date atoms' '
 	git for-each-ref --format="%(authordate)" refs/heads &&
 	git for-each-ref --format="%(authordate:default) %(authordate)" refs/heads &&
-- 
2.50.0


From mboxrd@z Thu Jan  1 00:00:00 1970
Received: from mail-pf1-f172.google.com (mail-pf1-f172.google.com [209.85.210.172])
	(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
	(No client certificate requested)
	by smtp.subspace.kernel.org (Postfix) with ESMTPS id E1D551FFC48
	for <git@vger.kernel.org>; Sun,  6 Jul 2025 21:41:24 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.172
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
	t=1751838086; cv=none; b=AflxcgsQqQFQPFVfD3Q6YmvkRFj3x9jyLxhpGhofSgdbWBhOmQuw1Ap/3Nr2bTgm78kxEOydtbvIw6ROexPUk6BglWewiOgAq3vjyZHbeing2Mi/hkHTCoTHCrT+E25Z0oRmW6lZbTfw2Xp8V7lSpPQZv5gixeekGZMCMyhAkHc=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
	s=arc-20240116; t=1751838086; c=relaxed/simple;
	bh=zXNyI3iAu+z2j6kPWQrmOBxju1A1wzpfLBcR+HeK48M=;
	h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References:
	 MIME-Version; b=EyuqgvLYk0t5jlUQxDfOC7BwY/tzIPMpttuNYNJ6fOm2N/nUlxGvB8dwoVfPfFajKuwV3IK7T2u2obAZBv8028k51NU0UE8J6Wq/hd6t+UY9OZcXKHxj7Nxn+u8rZUCha1ZF4Ze6RjWa/qWPFlEOhVjpt77VcipdV7vVrNtg/AI=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=JyNvBGLu; arc=none smtp.client-ip=209.85.210.172
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.b="JyNvBGLu"
Received: by mail-pf1-f172.google.com with SMTP id d2e1a72fcca58-7399a2dc13fso3061046b3a.2
        for <git@vger.kernel.org>; Sun, 06 Jul 2025 14:41:24 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=20230601; t=1751838084; x=1752442884; darn=vger.kernel.org;
        h=content-transfer-encoding:mime-version:references:in-reply-to
         :message-id:date:subject:cc:to:from:from:to:cc:subject:date
         :message-id:reply-to;
        bh=Gw0+cyixDBek6HKBJK2biFdG5zoip9i4i8poQFGeNyg=;
        b=JyNvBGLuAVAvZzTKqh6xbeIee+QLWpw+YG06XlIpsH930o/HeWxI5/vHBCLijkn5Rc
         FFUiucN+ThBuvUu9FF4rzVuEC/FieMHpesCs2NkPboji16qynZu0JsvZ9uZ0SOknZHmT
         81ZOhxFjDPnviCIOb0m5B0z5kDFb4wHmbSgSyNJ84bXbs9eLgoAUgS3yTb/0YIbzEatO
         VkYPHv0pi+sI/tNpg3XFKyW9kYEvY5sV5abprxf/0o9FyXgWd8wb3ZypopUWuM8p2cPs
         2n+MEnldZurb5J1NWskqtij1t5Ukiy5A+cvt8hnCiaSlGjoNyeDaIHijbX4/kXETkVer
         fxig==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20230601; t=1751838084; x=1752442884;
        h=content-transfer-encoding:mime-version:references:in-reply-to
         :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc
         :subject:date:message-id:reply-to;
        bh=Gw0+cyixDBek6HKBJK2biFdG5zoip9i4i8poQFGeNyg=;
        b=oLYlmSaq5oF9qXa24cLkoD8BO57zSBztUstSezn2S7c2RjwQIAoV8XeX9QVmBpHJiX
         asrMtCIGEEF6chkZWKz+Qw4ifYwIFD3Dhcqr8TxycyVDLhY5GXuErSMMK3rNBN+e2Thl
         s7dB5ZGG5mV02/Ingjaf7OCvB4KWMi1CCPrcM0DJtUKZI95odoTdpAyOFgU1mxuIUAtX
         ORRq4aRDCBIBhwokS0GXmqOdZS9ouZe3pqlBChwPpH/troU0z0LZHwnw+g0LWjAOhhaS
         7kEwyWQ9h8WEf1Layj6KY7VOKQk6fuOh9K2xY3MoGYLCYgAFnTuVtnWdu0/i/SL+KJ3V
         tFDw==
X-Gm-Message-State: AOJu0Yx0bfgZJTjsXTyMt1z4ikzHncSuoMPwGm/Fry5d2QULgJkj4kA+
	OWacw8TxBqshYVTNz3kD07BIQDPCZusfdTSvbndx6ic34vBCMU8azBfJp58R/mqGRSw=
X-Gm-Gg: ASbGncskcY/ajIYIPwdCMa8a7zhKk9BAg/BheNqzOACV5SGD8oxZq1HjfmV0nL3lYD1
	oI/a/mwDdHb+ucty7x6VgFd13fwQIXvRIiV6lhd3cv3625BM6pWKN0mnlSgkT/531Q/pWV/z9wY
	PBcum4H1Y+Dq3htyGj2mW0dx5sR/Vl1K/jtF9QZaQROqKlfs5Lp9AX3AQEX2qAu5j4niKJ38e/7
	F1PwUW7qkc/1NAiNFptUBUwNMIBieHv1hgn4KTImSErZIXQBSaVhtz930iI0tJjJBdEUKIYfbJM
	tebWB5G/vRPuBkIEM3SeDxBtrrjVD3PDLTeMFCUJTOpgq49pbn7han3iPmoQ1R/GvNk81FOQgNB
	NlYdXfIAmXQE=
X-Google-Smtp-Source: AGHT+IFD/tv+voImnBgtQ1UUtvY86ES5ZviDyWYNCZ04z/vxFGIHav+QAGi08PZl+3I574ZLPfhpJg==
X-Received: by 2002:a05:6a00:1411:b0:749:bb6:3a8e with SMTP id d2e1a72fcca58-74ce658a5f3mr14720346b3a.1.1751838084069;
        Sun, 06 Jul 2025 14:41:24 -0700 (PDT)
Received: from archlinux.plaksha.edu.in ([202.164.41.66])
        by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-b38ee60c55csm7363968a12.43.2025.07.06.14.41.21
        (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
        Sun, 06 Jul 2025 14:41:23 -0700 (PDT)
From: Usman Akinyemi <usmanakinyemi202@gmail.com>
To: git@vger.kernel.org
Cc: ps@pks.im,
	chriscool@tuxfamily.org,
	christian.couder@gmail.com,
	gitster@pobox.com,
	me@ttaylorr.com,
	usmanakinyemi202@gmail.com
Subject: [PATCH v2 3/7] t/t1517: move ls-files -h test to t1517
Date: Mon,  7 Jul 2025 03:11:04 +0530
Message-ID: <20250706214108.714499-4-usmanakinyemi202@gmail.com>
X-Mailer: git-send-email 2.50.0
In-Reply-To: <20250706214108.714499-1-usmanakinyemi202@gmail.com>
References: <20250706214108.714499-1-usmanakinyemi202@gmail.com>
Precedence: bulk
X-Mailing-List: git@vger.kernel.org
List-Id: <git.vger.kernel.org>
List-Subscribe: <mailto:git+subscribe@vger.kernel.org>
List-Unsubscribe: <mailto:git+unsubscribe@vger.kernel.org>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit

The test 'ls-files does not crash with -h' checks that
the command exits cleanly with usage information, both inside and
outside of a repository.

Move this test from "t3004-ls-files-basic.sh" to
"t1517-outside-repo.sh" since it better fits with tests that check
command behavior outside a repository.

Suggested-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Usman Akinyemi <usmanakinyemi202@gmail.com>
---
 t/t1517-outside-repo.sh   | 7 +++++++
 t/t3004-ls-files-basic.sh | 7 -------
 2 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/t/t1517-outside-repo.sh b/t/t1517-outside-repo.sh
index 92ad159b58..e04be2d811 100755
--- a/t/t1517-outside-repo.sh
+++ b/t/t1517-outside-repo.sh
@@ -128,4 +128,11 @@ test_expect_success 'for-each-ref does not crash with -h' '
 	test_grep "[Uu]sage: git for-each-ref " usage
 '
 
+test_expect_success 'ls-files does not crash with -h' '
+	test_expect_code 129 git ls-files -h >usage &&
+	test_grep "[Uu]sage: git ls-files " usage &&
+	test_expect_code 129 nongit git ls-files -h >usage &&
+	test_grep "[Uu]sage: git ls-files " usage
+'
+
 test_done
diff --git a/t/t3004-ls-files-basic.sh b/t/t3004-ls-files-basic.sh
index 4034a5a59f..a1078f8701 100755
--- a/t/t3004-ls-files-basic.sh
+++ b/t/t3004-ls-files-basic.sh
@@ -34,13 +34,6 @@ test_expect_success 'ls-files -h in corrupt repository' '
 	test_grep "[Uu]sage: git ls-files " broken/usage
 '
 
-test_expect_success 'ls-files does not crash with -h' '
-	test_expect_code 129 git ls-files -h >usage &&
-	test_grep "[Uu]sage: git ls-files " usage &&
-	test_expect_code 129 nongit git ls-files -h >usage &&
-	test_grep "[Uu]sage: git ls-files " usage
-'
-
 test_expect_success SYMLINKS 'ls-files with absolute paths to symlinks' '
 	mkdir subs &&
 	ln -s nosuch link &&
-- 
2.50.0


From mboxrd@z Thu Jan  1 00:00:00 1970
Received: from mail-pf1-f177.google.com (mail-pf1-f177.google.com [209.85.210.177])
	(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
	(No client certificate requested)
	by smtp.subspace.kernel.org (Postfix) with ESMTPS id ED29D264FBD
	for <git@vger.kernel.org>; Sun,  6 Jul 2025 21:41:27 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.177
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
	t=1751838089; cv=none; b=OZcIhMyabz5MGG2pyg5oNJneJYHzWANyCRC5sb4OBV6Mk5DtvJynhDxQ07fDYj0SNc96xwnT9JH6iLViF8wlf/zO6yEXBLJTyCwdF7ze5aueks3ZxA6rusaCkxVrHroXbtAJltU1qcGLuAGjxGSbMqsq7z4x1lF7Fh0Et3BcDPw=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
	s=arc-20240116; t=1751838089; c=relaxed/simple;
	bh=O+6KPxYF7l6IQ4SZw8lxBuEDj9jDbmuBLJvZVkQQcvM=;
	h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References:
	 MIME-Version; b=jQtyAi4Wg7R4AvLtb1vs4IBd+YSYa7NVoT7pgn35sS/rk9dPsIoonJQSFWJsgLOok9qdEB8plAOCzhVjIH6z8oBo95TKQtYcAP1XxbdfgQ2bkWLLW6sl+hPfnlQPuZgfqp9YsG2Eea+NG3KO33c1UFZ3C0TuVM6cDbEnU1aJan8=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=I6poHymM; arc=none smtp.client-ip=209.85.210.177
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.b="I6poHymM"
Received: by mail-pf1-f177.google.com with SMTP id d2e1a72fcca58-748d982e97cso2295964b3a.1
        for <git@vger.kernel.org>; Sun, 06 Jul 2025 14:41:27 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=20230601; t=1751838087; x=1752442887; darn=vger.kernel.org;
        h=content-transfer-encoding:mime-version:references:in-reply-to
         :message-id:date:subject:cc:to:from:from:to:cc:subject:date
         :message-id:reply-to;
        bh=RRWoG//ff0MWiP5lWHpxBF1qdq3rLh3uhRVq+9gd4jg=;
        b=I6poHymMfhnmbC/Ek0z4ZZNfnAgpHCTLpCMycKd70RkFBoHwuEZQEK7g/mgmY6yGSq
         N3M4oNmKfBrwBoKwMZaQHYVHCXKYoX2LNaxUy/72RbBQfX13wYg9+AdHVw6qLU5gUXYw
         IsUD+YxpTENCzpNOnwH81d/wMb41UC9sytSn4DvU9HnxSlR8iLUqQMxMehQdP4TV/kRZ
         MjR+zePvB7xkGZ4ODIcALekakq2fhLFWwmG5HDawGDHxolugUJSKog7uNmkb6WMETghQ
         UsmvJE55dzl70lakQFDHXDSdnhD5xJblVZLuiN2/tDQdIep0AGsxByElNgwuPOoBAiCx
         ZdKQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20230601; t=1751838087; x=1752442887;
        h=content-transfer-encoding:mime-version:references:in-reply-to
         :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc
         :subject:date:message-id:reply-to;
        bh=RRWoG//ff0MWiP5lWHpxBF1qdq3rLh3uhRVq+9gd4jg=;
        b=hjqk/R8BjkGMEhhKRqrOAJJSns0n5YHwjnvjfKfPsWZRmyv9qlSw2f1KTX+uRy3+Ma
         EBB/RUSbZAu/wqLq/UJSNOsmyC6baIymKdK1T0vbdzF8K2H3LOqSNNQYSArLY2aa5Nxq
         1HX5yDyvXowtNWHBwS2FRtSrsVv7Cd3sZqLsakZBEGymneIM2MxQsliyvnd04YolsL+W
         2AJKsDf3I0pK8gipVhM89/l7Kk1keQtKjvRhGJZG+cu+ySRs7SNbdiMAs8WGNlos9Ay3
         ajd3hePokatls2YpWTQheGNQPmDvLc+/kNhJw/S3N7J+3NVrHJdLKIQycRhlAHm0Rti9
         DXDA==
X-Gm-Message-State: AOJu0Yy6I9mB23P+fs7HKOnOE5u7ZAT4r5wOwCgZuCEcYYK8q7aUSnYN
	Qy27IpUrTP2vWso/QK1oPE454jqiwa/hoPlR7ZsARBKNgvC8VhkeDCUyaNcN+2M07a8=
X-Gm-Gg: ASbGncsAMT4rSGjke9gbfVs80DTbpbRSU/2lQDt71FF55dXbexpbrzLpmvN9BJhPBrn
	kLYbiWCsd+s2gIN/8RK1kKfNISyrK/ZYWldY6SFN6/37yqFD1j3jmmj2N7zja+kLTY0S7qiRq5Z
	0I4/II7vYhypJAXe9xV6dcVp0boFhNich+2v4URgjyNBEvJ03+EaqG5FdoCkLncFfh0piYma5qJ
	1uNNtBow2DSwaEi5zEZBVOnZtVxDoPzNwFCMA5o2q94yV4hvmFrb9tKH9P0P2+IGuWK4mzKCyOv
	BM/RWtdCrVVPpBB/Fp486rVEucwVnVl6HVGbTNx/Z5dKNH5hTxIcQgOESJ+opj2BRQJPqAls7cM
	AnMlhHnO4nFg=
X-Google-Smtp-Source: AGHT+IHJVD75M+hAYnP36bgN0EYCcnncmVKmTV+78alAsLbUBFsbip+ivYV+SubZqcDmIyRKiUCGUg==
X-Received: by 2002:a05:6a20:72a4:b0:220:19b7:9d6b with SMTP id adf61e73a8af0-225b800e7e5mr15411804637.9.1751838087113;
        Sun, 06 Jul 2025 14:41:27 -0700 (PDT)
Received: from archlinux.plaksha.edu.in ([202.164.41.66])
        by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-b38ee60c55csm7363968a12.43.2025.07.06.14.41.24
        (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
        Sun, 06 Jul 2025 14:41:26 -0700 (PDT)
From: Usman Akinyemi <usmanakinyemi202@gmail.com>
To: git@vger.kernel.org
Cc: ps@pks.im,
	chriscool@tuxfamily.org,
	christian.couder@gmail.com,
	gitster@pobox.com,
	me@ttaylorr.com,
	usmanakinyemi202@gmail.com
Subject: [PATCH v2 4/7] t/t1517: move pack-refs -h test to t1517
Date: Mon,  7 Jul 2025 03:11:05 +0530
Message-ID: <20250706214108.714499-5-usmanakinyemi202@gmail.com>
X-Mailer: git-send-email 2.50.0
In-Reply-To: <20250706214108.714499-1-usmanakinyemi202@gmail.com>
References: <20250706214108.714499-1-usmanakinyemi202@gmail.com>
Precedence: bulk
X-Mailing-List: git@vger.kernel.org
List-Id: <git.vger.kernel.org>
List-Subscribe: <mailto:git+subscribe@vger.kernel.org>
List-Unsubscribe: <mailto:git+unsubscribe@vger.kernel.org>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit

The test 'pack-refs does not crash with -h' checks that
the command exits cleanly with usage information, both inside and
outside of a repository.

Move this test from "t0610-reftable-basics.sh" to
"t1517-outside-repo.sh" since it better fits with tests that check
command behavior outside a repository.

Suggested-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Usman Akinyemi <usmanakinyemi202@gmail.com>
---
 t/t0610-reftable-basics.sh | 7 -------
 t/t1517-outside-repo.sh    | 7 +++++++
 2 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/t/t0610-reftable-basics.sh b/t/t0610-reftable-basics.sh
index 3ea5d51532..ffd8ecc0ce 100755
--- a/t/t0610-reftable-basics.sh
+++ b/t/t0610-reftable-basics.sh
@@ -14,13 +14,6 @@ export GIT_TEST_DEFAULT_REF_FORMAT
 
 INVALID_OID=$(test_oid 001)
 
-test_expect_success 'pack-refs does not crash with -h' '
-	test_expect_code 129 git pack-refs -h >usage &&
-	test_grep "[Uu]sage: git pack-refs " usage &&
-	test_expect_code 129 nongit git pack-refs -h >usage &&
-	test_grep "[Uu]sage: git pack-refs " usage
-'
-
 test_expect_success 'init: creates basic reftable structures' '
 	test_when_finished "rm -rf repo" &&
 	git init repo &&
diff --git a/t/t1517-outside-repo.sh b/t/t1517-outside-repo.sh
index e04be2d811..5b4373f8cd 100755
--- a/t/t1517-outside-repo.sh
+++ b/t/t1517-outside-repo.sh
@@ -135,4 +135,11 @@ test_expect_success 'ls-files does not crash with -h' '
 	test_grep "[Uu]sage: git ls-files " usage
 '
 
+test_expect_success 'pack-refs does not crash with -h' '
+	test_expect_code 129 git pack-refs -h >usage &&
+	test_grep "[Uu]sage: git pack-refs " usage &&
+	test_expect_code 129 nongit git pack-refs -h >usage &&
+	test_grep "[Uu]sage: git pack-refs " usage
+'
+
 test_done
-- 
2.50.0


From mboxrd@z Thu Jan  1 00:00:00 1970
Received: from mail-pf1-f180.google.com (mail-pf1-f180.google.com [209.85.210.180])
	(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
	(No client certificate requested)
	by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5E90E264FBD
	for <git@vger.kernel.org>; Sun,  6 Jul 2025 21:41:31 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.180
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
	t=1751838092; cv=none; b=BvNxu03Uzl9NSzKTokxBF18p9liI0RSc454bVR4ThUEnotMGBGYCxtkyjR1vly8NkSmOmJFG1OMesK6p+C/zfLHN/sPd8kbczb7aKbJ5qPVp+q1ABD5LuPeQ4Dqi0rdudBHa3proX/yNGphumaYVSXNt+diR/QtB6yy0bli99k4=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
	s=arc-20240116; t=1751838092; c=relaxed/simple;
	bh=qNze35MgPi+5knen13lYeCLPF79RoKcrJIbb4HcZvrk=;
	h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References:
	 MIME-Version; b=bEazvVa6jH2LjXePY/OvrsaJzLGrlpWM/jrzTj09Y5VD8+cT5bzSATO/hZnHP6ZOkeFdjibsugOS1nR3ElGqfymYTt7tUa8OG/VwVcxC53YjGnb7Ay7gywHkQXP2hZg74ld9bnGtvRQ05XW5/cAe/vNXVyebGO4eDEyofnD+Huo=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=R9im1IQu; arc=none smtp.client-ip=209.85.210.180
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.b="R9im1IQu"
Received: by mail-pf1-f180.google.com with SMTP id d2e1a72fcca58-74af4af04fdso2645214b3a.1
        for <git@vger.kernel.org>; Sun, 06 Jul 2025 14:41:31 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=20230601; t=1751838090; x=1752442890; darn=vger.kernel.org;
        h=content-transfer-encoding:mime-version:references:in-reply-to
         :message-id:date:subject:cc:to:from:from:to:cc:subject:date
         :message-id:reply-to;
        bh=fHUkZQwyNfT9bd2zYgGVuigW8XA1GHIA7l3jy9szCqI=;
        b=R9im1IQuvLnpgok3ergxRhRPm4EsCBHxeOE0Y0yNVxiYLlleG2ZTz1DlID+NFeTWRk
         W8gkHr2oYol5RUxxXOYeGPe3E2IBWZPfS2Dk9XebW8yDXJiMFouiWuVqNCU9xO4zqLzS
         iBJB2ulmtZdQJokDE5a/A7boQjcgImb6loggG4iQ/8zK2/ljZeZOmw4j75VkBTeFr0dR
         31r1cc8bAH7xGiBMThZiACxsP84VYSUTOP4GH490w5jMbDmtedwK+G4Ap9H7p6Gzvy0q
         2Sl36M/UyoeiKFGbj4YhNjhKaxYlEc2b0Jp/bpq36YAefukmo6y4EbTytQ3dqFuQ1wBQ
         5iPg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20230601; t=1751838090; x=1752442890;
        h=content-transfer-encoding:mime-version:references:in-reply-to
         :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc
         :subject:date:message-id:reply-to;
        bh=fHUkZQwyNfT9bd2zYgGVuigW8XA1GHIA7l3jy9szCqI=;
        b=p8me+mKP/bSxTxxgQfTzBCDmeynedo2h70qbivVBBpSzzL7m30kCU3Ry+OcTIIMRXn
         CxEPtJjsErjyFE4llUKnZ6vCCWpg4svJFmQH38nvJZYLLh5dpLOPzAW1NBNMpxwXUYLA
         2PiGx5su4Olg03s7Q6TL2RAwlOXO+zEiSuSOeSHxacJGxJ7d1ImsDEbRsn/z1+AhZsNC
         TQ3pD/asKPANuoid5vaPTmhSpyY2Ic94BUQbj4pjt0/0aAgYYVuYfKXFYHNPgG+oocdH
         NS7mZTCqS5K8R7YgpYfG7xeyzem+azfhZ2HMl/5TREpxUzuFL3u9W8c5zHC2dnM63FhI
         daZg==
X-Gm-Message-State: AOJu0YxH8v7G9DPRk4erPDXg1DJl+1Z59EkqnawGiTrhWC/O3OQHrNBN
	oru511HNbRBDUw50qV8ipkL3wMSG2g0MrIRhzsaMgJrOCvCvhJf7gaYk507lA/dp9bw=
X-Gm-Gg: ASbGncvBbHQeZnSKP+K+cL/jMOeZt5dvitszKe/2mQghDxgd0pv9cRQ/LjJH2Dtxhyg
	7aTaj+YhL0hfkvPrE2HQl0ykpm3SZ9iYWXpkPOcjbPNDKG1PoGpeTlbMj4GTP/DNbkjggswBVsn
	MN/zgukh+WjdAApLuMbAFcKFfpn4qdCSRd8O9et1XAMT6lbrwsUrG8SQJNMSXgf/yZRpRmg1zza
	mXP7f9OAyTMB624hsNTU4g4AFDUiiph/7OOSVTnWEm3+qq/cAZXJWKPO8EpEdGz/WrZuSOKVce2
	rH7qW5n6I40V5vB16jgB9qKFz97MdB0Bmfo6fR0xztHy1/kD1lENEb+S3XSsliQ2/6UwsN2GGr5
	dnEfbdsiepw4=
X-Google-Smtp-Source: AGHT+IE6+K58ysIAEwTR7p+T4nAO+HFF0Uc8d87gpbeVesi8ADw/+3tRPWzxR2nWNbUuvZNrgb0kWw==
X-Received: by 2002:a05:6300:4c:b0:220:9512:9213 with SMTP id adf61e73a8af0-225af73fe9dmr17107973637.15.1751838090524;
        Sun, 06 Jul 2025 14:41:30 -0700 (PDT)
Received: from archlinux.plaksha.edu.in ([202.164.41.66])
        by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-b38ee60c55csm7363968a12.43.2025.07.06.14.41.27
        (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
        Sun, 06 Jul 2025 14:41:30 -0700 (PDT)
From: Usman Akinyemi <usmanakinyemi202@gmail.com>
To: git@vger.kernel.org
Cc: ps@pks.im,
	chriscool@tuxfamily.org,
	christian.couder@gmail.com,
	gitster@pobox.com,
	me@ttaylorr.com,
	usmanakinyemi202@gmail.com
Subject: [PATCH v2 5/7] t/t1517: move send-pack -h test to t1517
Date: Mon,  7 Jul 2025 03:11:06 +0530
Message-ID: <20250706214108.714499-6-usmanakinyemi202@gmail.com>
X-Mailer: git-send-email 2.50.0
In-Reply-To: <20250706214108.714499-1-usmanakinyemi202@gmail.com>
References: <20250706214108.714499-1-usmanakinyemi202@gmail.com>
Precedence: bulk
X-Mailing-List: git@vger.kernel.org
List-Id: <git.vger.kernel.org>
List-Subscribe: <mailto:git+subscribe@vger.kernel.org>
List-Unsubscribe: <mailto:git+unsubscribe@vger.kernel.org>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit

The test 'send-pack does not crash with -h' checks that
the command exits cleanly with usage information, both inside and
outside of a repository.

Move this test from "t/t5400-send-pack.sh" to
"t1517-outside-repo.sh" since it better fits with tests that check
command behavior outside a repository.

Suggested-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Usman Akinyemi <usmanakinyemi202@gmail.com>
---
 t/t1517-outside-repo.sh | 7 +++++++
 t/t5400-send-pack.sh    | 7 -------
 2 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/t/t1517-outside-repo.sh b/t/t1517-outside-repo.sh
index 5b4373f8cd..a140b5cc38 100755
--- a/t/t1517-outside-repo.sh
+++ b/t/t1517-outside-repo.sh
@@ -142,4 +142,11 @@ test_expect_success 'pack-refs does not crash with -h' '
 	test_grep "[Uu]sage: git pack-refs " usage
 '
 
+test_expect_success 'send-pack does not crash with -h' '
+	test_expect_code 129 git send-pack -h >usage &&
+	test_grep "[Uu]sage: git send-pack " usage &&
+	test_expect_code 129 nongit git send-pack -h >usage &&
+	test_grep "[Uu]sage: git send-pack " usage
+'
+
 test_done
diff --git a/t/t5400-send-pack.sh b/t/t5400-send-pack.sh
index 83b42ff073..571e8f1bc5 100755
--- a/t/t5400-send-pack.sh
+++ b/t/t5400-send-pack.sh
@@ -55,13 +55,6 @@ test_expect_success setup '
 	echo Rebase &&
 	git log'
 
-test_expect_success 'send-pack does not crash with -h' '
-	test_expect_code 129 git send-pack -h >usage &&
-	test_grep "[Uu]sage: git send-pack " usage &&
-	test_expect_code 129 nongit git send-pack -h >usage &&
-	test_grep "[Uu]sage: git send-pack " usage
-'
-
 test_expect_success 'pack the source repository' '
 	git repack -a -d &&
 	git prune
-- 
2.50.0


From mboxrd@z Thu Jan  1 00:00:00 1970
Received: from mail-pg1-f169.google.com (mail-pg1-f169.google.com [209.85.215.169])
	(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
	(No client certificate requested)
	by smtp.subspace.kernel.org (Postfix) with ESMTPS id D20FB264FBD
	for <git@vger.kernel.org>; Sun,  6 Jul 2025 21:41:34 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.215.169
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
	t=1751838096; cv=none; b=g5AzD3pKsnKH5Y3QaInbAKZZt6D01/KAsQ7Sp8BBQ91TTUYTPNiK9QaPLsDTA8aDfL3jZ2DAwIeaY/4dqlBFzRuC4+1oMQ64b9s5XJko9jd0HhqvCGqSBOuD2N1Z/iM4fpWk8NWXZwtZXTr33WWJ9zYO910uqC5q7ACYAe0PTIc=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
	s=arc-20240116; t=1751838096; c=relaxed/simple;
	bh=Zb5jTO4z5UneoRxOjzFrEJHHqAeU81PjCphoDz1eArE=;
	h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References:
	 MIME-Version; b=Vdxrc0sJsF7TesElw8m8LifFhuhu1phNvHUhhyRdbxQQPwEV7gZmUxyH4CHey7bnpZe6uUiy3txXQKFkCE+R3pE3rKe6gCgDTZTC4drJUHHf47ePP1a+vIs8SEvo0yh1vtuaSLEbSkIpXc7/OsQt9CZ8X4JaEYZQs0XIvBmLals=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=SO5o89l+; arc=none smtp.client-ip=209.85.215.169
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.b="SO5o89l+"
Received: by mail-pg1-f169.google.com with SMTP id 41be03b00d2f7-b170c99aa49so1628909a12.1
        for <git@vger.kernel.org>; Sun, 06 Jul 2025 14:41:34 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=20230601; t=1751838094; x=1752442894; darn=vger.kernel.org;
        h=content-transfer-encoding:mime-version:references:in-reply-to
         :message-id:date:subject:cc:to:from:from:to:cc:subject:date
         :message-id:reply-to;
        bh=Jvw7Sv/lTGXCHHVNYmRK17aLG+acmaN9qwnSQM/ItTc=;
        b=SO5o89l+GBpyjcY/LEPZI3oiCCdQ9KxmN08KoDBxfsTgZxnzXCQMU7Ejglsom1hnH6
         3xOm92R4vW054isaCO9rLMo3h8oN+7mwwBhH3fIjxM4lkqmn2M+wMzi3N362Notzgh4c
         a+akUgluye/61OZzQTEjTFa5tS9ZSEClN4F02i2/da8ua3jrzSQj0d6+FTXbZ19TgouB
         IXA3MsYqQ7zaz8E6Zh6z8taYqI9G23cnSLJUNkiN9xoVBwj/VHubjY0/ABRwlEXegqqy
         25sD8jTSlNE8JwqLHsXuIUmEpC/dRBK9jJdXxOtW5RF7RcQObVb3/m6PYNYaYn47wVEz
         LpsA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20230601; t=1751838094; x=1752442894;
        h=content-transfer-encoding:mime-version:references:in-reply-to
         :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc
         :subject:date:message-id:reply-to;
        bh=Jvw7Sv/lTGXCHHVNYmRK17aLG+acmaN9qwnSQM/ItTc=;
        b=JmICZLQw2d3KkgaMUv2Kx3gbUW2V13X9lMNV9UqaHMTGy9TeraV1PGGrW6wB/aNCN9
         vy4jjWDgh6SEAJTUXNfGyt7duLPxor5q98Qnm4YplEw/HHC6A/0n6EbSfApT98nCnlOu
         lisLge1mJC4/Nls5uE4ghnFmbvfE06jZbFuVF9/g0AsiIau/g2FJyBTtsLzIw+enH46C
         BZaH+dvGgQvYC+CrxhjOsNSKhVVLQ7/bwrB7AwznV7MySeLDokz5HYBK7EQmQthlJjVv
         3XcrcFlrYm68SYVyOD/2UY7+PfxJ9op0Kg6n/JWdxgNZ3rAuQU8x2Oejse6ZwvCQBzpY
         nhIw==
X-Gm-Message-State: AOJu0Yz7ByGLjhRooE/pyGZ2Hn/s9EouL36Xc1TOP8xjwREvRfbA5uV5
	v9goBAZoqxAwupHlIEkhLoB1O1Hc/CK+5oz937G1DBNnwJT/mMw+Y7of7tJHu10sxcA=
X-Gm-Gg: ASbGncu1JkfKyJFIT3GjHuiQXCaxvdO2HXkajTcfONT/YX9bnXK848zc1fULmI8MLG4
	5Hi7+YtpfUS1qNNP1SPt9gC0l9q51vH90UHfOjXXWFbbHLj0MC+7xCYlQpXKARBbNlDEq/8Xl8F
	SWGb1jBZnG4qswwGR0Y3FgYcC7+9fX4k0LOUcIgsLlhy/ZCUIClURNEPOeCfhetDSLdu/z8QfHb
	G9Q1sO/+gqqmY+6jE5oq1IHVGJg8U72+qvVhpSGlajqrFhTTuiwHQq6a3jx5e+uB/+HONj/fbK/
	+dFJIw0ar3Kojh4VExeABKKzbpyPe0IpfwslWZD/7Sv7NpovdDboXRGPlAaLr46tOLa39AltCjP
	mvxocRwh7tFk=
X-Google-Smtp-Source: AGHT+IHpg0oqla00Aca7RoqAnGWNVKqHNNyg2E6aNiBBvvfDnLRkWNL+iIhiSBzVPLvFJq9ot0GOrg==
X-Received: by 2002:a17:90b:558e:b0:311:eb85:96df with SMTP id 98e67ed59e1d1-31aba8c6836mr11511286a91.17.1751838093799;
        Sun, 06 Jul 2025 14:41:33 -0700 (PDT)
Received: from archlinux.plaksha.edu.in ([202.164.41.66])
        by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-b38ee60c55csm7363968a12.43.2025.07.06.14.41.30
        (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
        Sun, 06 Jul 2025 14:41:33 -0700 (PDT)
From: Usman Akinyemi <usmanakinyemi202@gmail.com>
To: git@vger.kernel.org
Cc: ps@pks.im,
	chriscool@tuxfamily.org,
	christian.couder@gmail.com,
	gitster@pobox.com,
	me@ttaylorr.com,
	usmanakinyemi202@gmail.com
Subject: [PATCH v2 6/7] t/t1517: move verify-commit -h test to t1517
Date: Mon,  7 Jul 2025 03:11:07 +0530
Message-ID: <20250706214108.714499-7-usmanakinyemi202@gmail.com>
X-Mailer: git-send-email 2.50.0
In-Reply-To: <20250706214108.714499-1-usmanakinyemi202@gmail.com>
References: <20250706214108.714499-1-usmanakinyemi202@gmail.com>
Precedence: bulk
X-Mailing-List: git@vger.kernel.org
List-Id: <git.vger.kernel.org>
List-Subscribe: <mailto:git+subscribe@vger.kernel.org>
List-Unsubscribe: <mailto:git+unsubscribe@vger.kernel.org>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit

The test 'verify-commit does not crash with -h' checks that
the command exits cleanly with usage information, both inside and
outside of a repository.

Move this test from "t/t7510-signed-commit.sh" to
"t1517-outside-repo.sh" since it better fits with tests that check
command behavior outside a repository.

Suggested-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Usman Akinyemi <usmanakinyemi202@gmail.com>
---
 t/t1517-outside-repo.sh  | 7 +++++++
 t/t7510-signed-commit.sh | 7 -------
 2 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/t/t1517-outside-repo.sh b/t/t1517-outside-repo.sh
index a140b5cc38..42381ef7eb 100755
--- a/t/t1517-outside-repo.sh
+++ b/t/t1517-outside-repo.sh
@@ -149,4 +149,11 @@ test_expect_success 'send-pack does not crash with -h' '
 	test_grep "[Uu]sage: git send-pack " usage
 '
 
+test_expect_success 'verify-commit does not crash with -h' '
+	test_expect_code 129 git verify-commit -h >usage &&
+	test_grep "[Uu]sage: git verify-commit " usage &&
+	test_expect_code 129 nongit git verify-commit -h >usage &&
+	test_grep "[Uu]sage: git verify-commit " usage
+'
+
 test_done
diff --git a/t/t7510-signed-commit.sh b/t/t7510-signed-commit.sh
index 39677e859a..0d2dd29fe6 100755
--- a/t/t7510-signed-commit.sh
+++ b/t/t7510-signed-commit.sh
@@ -8,13 +8,6 @@ export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
 GNUPGHOME_NOT_USED=$GNUPGHOME
 . "$TEST_DIRECTORY/lib-gpg.sh"
 
-test_expect_success GPG 'verify-commit does not crash with -h' '
-	test_expect_code 129 git verify-commit -h >usage &&
-	test_grep "[Uu]sage: git verify-commit " usage &&
-	test_expect_code 129 nongit git verify-commit -h >usage &&
-	test_grep "[Uu]sage: git verify-commit " usage
-'
-
 test_expect_success GPG 'create signed commits' '
 	test_oid_cache <<-\EOF &&
 	header sha1:gpgsig
-- 
2.50.0


From mboxrd@z Thu Jan  1 00:00:00 1970
Received: from mail-pf1-f175.google.com (mail-pf1-f175.google.com [209.85.210.175])
	(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
	(No client certificate requested)
	by smtp.subspace.kernel.org (Postfix) with ESMTPS id D601F288C2D
	for <git@vger.kernel.org>; Sun,  6 Jul 2025 21:41:37 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.175
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
	t=1751838101; cv=none; b=uRw1J8o+syaqvWOReHVQqvkFKwyjk3O1NFAZ55mUwX/jASOVfU3vp7q/AVPeX8FkVb+3dcBsgH4Ap7v//RnFr32xT4JfeOU0ARvfWF+oUi29hjBz9YwN707YwOhX2wa2GDLwGydhGPxCWlEeyYK4ayG0uePYO43gAEMhU2a6V9w=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
	s=arc-20240116; t=1751838101; c=relaxed/simple;
	bh=OUqIraMhV/ovaQYEA5cJq1iqg9loAhW41Ir/U058j/U=;
	h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References:
	 MIME-Version; b=aWNehUhPZVUnQCCfjh9YqweWpQLKej//SH9GT6OInstMM2rsrDgVk4/De3qiE2/qDEKzuj0Oa3EEBPLPBT2QWU+MH+00XoqlhCs20boH8AKrxOxaV2PJlgPu8Md08gGqNAP4IO2IBxNN/zlT+fFqPitT0n3xAkTAcEMCFyK54DE=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=lOm84H6+; arc=none smtp.client-ip=209.85.210.175
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.b="lOm84H6+"
Received: by mail-pf1-f175.google.com with SMTP id d2e1a72fcca58-74ad4533ac5so2694022b3a.0
        for <git@vger.kernel.org>; Sun, 06 Jul 2025 14:41:37 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=20230601; t=1751838097; x=1752442897; darn=vger.kernel.org;
        h=content-transfer-encoding:mime-version:references:in-reply-to
         :message-id:date:subject:cc:to:from:from:to:cc:subject:date
         :message-id:reply-to;
        bh=vlZymSS9r3W5Rr7srxoF1qARUYC22vbSIPL6X0s6HMs=;
        b=lOm84H6+wXyXiljFEj22Zd3eND7oi791BDub4uVFFezxvHFxnJ9ObLew5GGIUBIXgr
         Rb8JOipzpLRiYZ2OVo9+pIDtxvoOrAUGgqrvaN3aQZNMDRhJdSwo8EB8prQCfPYOhrvs
         X8vPvni/O0huX7wLhxaBMgZI7kcsmg6oCgrLsEcYEUjYSVQt/1PZfHzEl7/3zvA912HQ
         A1WQbDopyAEvFJ3pA3+l5GZK23XE/M257dQ7osDZFpLgMlFKiirdC7JMAQiV8wFsMcn7
         rdFENopkR0UA9RXedJJjadbeMYjaOj6yioLhNvJIpwKIr6nbmDOdkbNNA9DdjGqKSrcY
         zUGA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20230601; t=1751838097; x=1752442897;
        h=content-transfer-encoding:mime-version:references:in-reply-to
         :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc
         :subject:date:message-id:reply-to;
        bh=vlZymSS9r3W5Rr7srxoF1qARUYC22vbSIPL6X0s6HMs=;
        b=gpYQ0oM6jUXkByJST2mx1t6/X2pyTR1qWkARQs7S9EnXDvn5KdS4/P9NJxWUoIsO2S
         kq3hp5sIKqP0T6WuBC8OgrnOyOeQIZGylrqIcEJ6KC0G/1erwD8EDK5Adp1FI1A8wGl7
         KzP72bLPyuH3SrN6f3IAMVamKQpwSyGZX6+v9+8J3WurnvUPj/B3azyU9f7NwG7WDtrZ
         mmlc656mTIRKKlBKe9a85pUC3/LXaPjVDY2nFItJFWrGR06cOOGhfiuNvv9IE4pWFwqu
         wRA+9rTzWGquUzdaLkrzDWonwWFMkGGyQTWAw5TGv6PzIbHV6XOySBTGiw3rxnTI+ykw
         UrTg==
X-Gm-Message-State: AOJu0YxO8ss87HrmraCoshK6yC+9fpQBvzMbyYsmva0Hb/QssI1won2H
	YGF8p7FHNfj9Q28szCe/43U7fY2A93Y68ZZdLkWISccKMcdxJm2DimNKrmlYsd0oZUs=
X-Gm-Gg: ASbGncsNY38MaVH1I5SQIK3MN5eCRddrP5z9slLwmtFm5nxKfMJ0BGgxB40Pc1EspLg
	3PjV/OQ2zN6zUuUMmXYGdD1gcKbfYIIkKSnMPQSNwZvS/cvzgK+jVl7FG/LES8PI+hBoH/ktDr+
	2GdCdlIFMAk6fev+o+HusNIfbgcDdlSZBlxnCSu3m0KUEU+aDfRrJ1PHl72KIWciHh8/+67apIp
	uaTv3du579gE2M6LYmdn5o6rKMFDyxrua1WzjMC1iVmUQX+sJe78Xtwhd+IoJHfO2f48KIxu+O+
	1gFymhHIKM6hfGhLvYX5r999YIzP4e81BtGTvKQHweznS6eGPDH7X6s0f7Bl2fdLXpli3hjIGTU
	CkGnCTCPZGm0=
X-Google-Smtp-Source: AGHT+IFvSERr0+PCtYAfRvNjl+F4evT+tCzZ6WywJPH7Q3GQxWemvm4yW2f6+pwH27LzsBouCAvK/w==
X-Received: by 2002:a05:6a20:549d:b0:1f3:3547:f21b with SMTP id adf61e73a8af0-225ad6c1d25mr16512718637.5.1751838096892;
        Sun, 06 Jul 2025 14:41:36 -0700 (PDT)
Received: from archlinux.plaksha.edu.in ([202.164.41.66])
        by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-b38ee60c55csm7363968a12.43.2025.07.06.14.41.34
        (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
        Sun, 06 Jul 2025 14:41:36 -0700 (PDT)
From: Usman Akinyemi <usmanakinyemi202@gmail.com>
To: git@vger.kernel.org
Cc: ps@pks.im,
	chriscool@tuxfamily.org,
	christian.couder@gmail.com,
	gitster@pobox.com,
	me@ttaylorr.com,
	usmanakinyemi202@gmail.com
Subject: [PATCH v2 7/7] t/t1517: move verify-tag -h test to t1517
Date: Mon,  7 Jul 2025 03:11:08 +0530
Message-ID: <20250706214108.714499-8-usmanakinyemi202@gmail.com>
X-Mailer: git-send-email 2.50.0
In-Reply-To: <20250706214108.714499-1-usmanakinyemi202@gmail.com>
References: <20250706214108.714499-1-usmanakinyemi202@gmail.com>
Precedence: bulk
X-Mailing-List: git@vger.kernel.org
List-Id: <git.vger.kernel.org>
List-Subscribe: <mailto:git+subscribe@vger.kernel.org>
List-Unsubscribe: <mailto:git+unsubscribe@vger.kernel.org>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit

The test 'verify-tag does not crash with -h' checks that
the command exits cleanly with usage information, both inside and
outside of a repository.

Move this test from "t/t7030-verify-tag.sh" to
"t1517-outside-repo.sh" since it better fits with tests that check
command behavior outside a repository.

Suggested-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Usman Akinyemi <usmanakinyemi202@gmail.com>
---
 t/t1517-outside-repo.sh | 7 +++++++
 t/t7030-verify-tag.sh   | 7 -------
 2 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/t/t1517-outside-repo.sh b/t/t1517-outside-repo.sh
index 42381ef7eb..0755757d86 100755
--- a/t/t1517-outside-repo.sh
+++ b/t/t1517-outside-repo.sh
@@ -156,4 +156,11 @@ test_expect_success 'verify-commit does not crash with -h' '
 	test_grep "[Uu]sage: git verify-commit " usage
 '
 
+test_expect_success 'verify-tag does not crash with -h' '
+	test_expect_code 129 git verify-tag -h >usage &&
+	test_grep "[Uu]sage: git verify-tag " usage &&
+	test_expect_code 129 nongit git verify-tag -h >usage &&
+	test_grep "[Uu]sage: git verify-tag " usage
+'
+
 test_done
diff --git a/t/t7030-verify-tag.sh b/t/t7030-verify-tag.sh
index 2c147072c1..6f526c37c2 100755
--- a/t/t7030-verify-tag.sh
+++ b/t/t7030-verify-tag.sh
@@ -7,13 +7,6 @@ export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
 . ./test-lib.sh
 . "$TEST_DIRECTORY/lib-gpg.sh"
 
-test_expect_success GPG 'verify-tag does not crash with -h' '
-	test_expect_code 129 git verify-tag -h >usage &&
-	test_grep "[Uu]sage: git verify-tag " usage &&
-	test_expect_code 129 nongit git verify-tag -h >usage &&
-	test_grep "[Uu]sage: git verify-tag " usage
-'
-
 test_expect_success GPG 'create signed tags' '
 	echo 1 >file && git add file &&
 	test_tick && git commit -m initial &&
-- 
2.50.0


From mboxrd@z Thu Jan  1 00:00:00 1970
Received: from mail-pg1-f178.google.com (mail-pg1-f178.google.com [209.85.215.178])
	(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
	(No client certificate requested)
	by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5DFA8846F
	for <git@vger.kernel.org>; Sun,  6 Jul 2025 21:50:46 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.215.178
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
	t=1751838648; cv=none; b=kq34SHR3vfhZyS9XEDi+QnyjE1YOzzbjBDiGzGPQ7WYQvYQ82kPX5PNKFVo+YbX46yb3bgN5wKRkqPzfnvXLS8VAutNIg4IadWx1t0BD6/bmlZY7e3DBafksLYsDBw8A+8LK3f04FDfhQIgrdf3+5yqzBN4Ejjl1EQuxfp0IjKg=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
	s=arc-20240116; t=1751838648; c=relaxed/simple;
	bh=Y34xFMXSSc8JJTH6Ujy44cfIhIIv7fNkabK8jh+gBDA=;
	h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References:
	 MIME-Version; b=Z0X8Ths9upolRK7QvtSUrxar6zFaI33BEKlDWyP4ZRWPBJ58A+IcbQWvOSWEqeE94loqsMUTH1Zmj74fd+HkhYQFerJFUhR/T9qzeP0Y4JiUB5GZY0INQMotmRNIIz/gNSEMurFyAaJnVfkl5+F6vhocAuGqkGAyeaucaQspaTg=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=VW099qzS; arc=none smtp.client-ip=209.85.215.178
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.b="VW099qzS"
Received: by mail-pg1-f178.google.com with SMTP id 41be03b00d2f7-b170c99aa49so1631785a12.1
        for <git@vger.kernel.org>; Sun, 06 Jul 2025 14:50:46 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=20230601; t=1751838646; x=1752443446; darn=vger.kernel.org;
        h=content-transfer-encoding:mime-version:references:in-reply-to
         :message-id:date:subject:cc:to:from:from:to:cc:subject:date
         :message-id:reply-to;
        bh=GI//1jHfKK99/7636C/KS63ejO3PkzNVFf3bDNgjdhk=;
        b=VW099qzS1tWKNesHIEDYItgL6AkRccq8ec4N7QV7/nbYGliC94ERxknGFs+CuipoB6
         qshprguIjnxSYr1o8v2yghOC1/Hpq/OguCJu4nRRtmtblgW1TUA3Gjwy8REjhigLXXFB
         LdxYu6zN4NmNO73NAwhslgg0o1a7gvOHmaOjfYqPNg0jq3x4TOXdenezt2yi67FYSUOK
         V68mQ+/Gw5o3+OTB55fTkM4PP2Ob8OghDO6AoOrSBAZ/ThXcOOPM1cHRJ6EF6Wi62VAY
         zVlFN0CXjhYhIJuqwNt6o6k5htMjLudKaM0UFMxRQMyKmGjtFDHNxMIK5ADUhQQIfmi0
         kj8Q==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20230601; t=1751838646; x=1752443446;
        h=content-transfer-encoding:mime-version:references:in-reply-to
         :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc
         :subject:date:message-id:reply-to;
        bh=GI//1jHfKK99/7636C/KS63ejO3PkzNVFf3bDNgjdhk=;
        b=CmHOJGycPpy5amIThpLb6RU3jZtBD8ExTLXQO6d7WnDNEDZQwCgeU8VThf/+UCWy07
         YMejo/chKKH+ycgsFCA1Pis3r/G01/WyXODJdsYHgq9S1zu9Iiip5D6rnYwdk1T6aKqf
         guBfuSdqCbgCILLRAha5eU+Yd/NzX7mXalAK+o644UghK6IXKXxWDoM2GpdIqTgfC1eh
         oRBOEP2C2vqd1FDXBcIxh1T15/LFThDCQnnzMzHD6HalCvZ+KDUL4H4Znb7P58b/IYCX
         Rzfb+d4h21xdUcSCOkKFrtxgP7A5Sz/VxD7pE3diXunibzLcx3DWXhg1Bw1DXtIA/kjy
         G1mw==
X-Forwarded-Encrypted: i=1; AJvYcCURmwD0ecV0AzOo9hzyrLf7iep8ZqbVKLG5XE0/h4kGIwTbd4ll7qtYWnv4yHS9kR5hhIk=@vger.kernel.org
X-Gm-Message-State: AOJu0Yyjp170UdwNHFctgEZOpEOdcgZKxv4SicIwoXzs4etZOA9BudwB
	NcvuXpGU/eiGbeFNCBqV/LgQA3rFxRexKH5t8KYOrlGgW80CVYNmKequ
X-Gm-Gg: ASbGncvoywKYnWmO7h+iuPlpMJp0LCN9TlS8qPrOUz2+8DGdlvDOO68nBRCLdSUkl+Q
	5We9q5X16hVNgxZUYSZkNufh4WQ0OTo46fFn7RtdxktdycIzVtUZTBaM/iX0lcw0bLvrPbnoy5K
	mayYhi3YrIIiYGBD74q6APXeBuKEM854uIkDZjSgI9vcDxe0XezkKnbUB12gpnx5HwNb6CcKYaV
	y0cWWCdDzKZssEQ2roj/P+17a2jG5e16A4ByAkv5RRr9z2MGVT11h+C9HJlpc3zAVeIbD9keMoQ
	UwaIyYHPgJfHhRlLjeDDI7U3aFS/PAkdCEzQRD0sx1uxH/6WZ31jmeoY2wE3DUZtV1rtvP3gzfG
	Od0boEACPnxs=
X-Google-Smtp-Source: AGHT+IExPSjbbDcqydibIrgbXGQxESF60pStdSwFjPHLBLwFdIwEwWbnxg43vsxw3QClyRjHVgIlUQ==
X-Received: by 2002:a17:902:e5cf:b0:235:6aa:1675 with SMTP id d9443c01a7336-23c91070e40mr103288255ad.52.1751838645663;
        Sun, 06 Jul 2025 14:50:45 -0700 (PDT)
Received: from archlinux.plaksha.edu.in ([202.164.41.66])
        by smtp.gmail.com with ESMTPSA id d9443c01a7336-23c8457f308sm72912335ad.149.2025.07.06.14.50.42
        (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
        Sun, 06 Jul 2025 14:50:45 -0700 (PDT)
From: Usman Akinyemi <usmanakinyemi202@gmail.com>
To: usmanakinyemi202@gmail.com,
	git@vger.kernel.org
Cc: chriscool@tuxfamily.org,
	christian.couder@gmail.com,
	gitster@pobox.com,
	me@ttaylorr.com,
	ps@pks.im
Subject: [PATCH v2 0/7] move builtin help test to t1517
Date: Mon,  7 Jul 2025 03:20:32 +0530
Message-ID: <20250706215039.715732-1-usmanakinyemi202@gmail.com>
X-Mailer: git-send-email 2.50.0
In-Reply-To: <20250706214108.714499-1-usmanakinyemi202@gmail.com>
References: <20250706214108.714499-1-usmanakinyemi202@gmail.com>
Precedence: bulk
X-Mailing-List: git@vger.kernel.org
List-Id: <git.vger.kernel.org>
List-Subscribe: <mailto:git+subscribe@vger.kernel.org>
List-Unsubscribe: <mailto:git+unsubscribe@vger.kernel.org>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit

In patch series which contain this
"[*]: 43a8391977 (builtin/verify-tag: stop using `the_repository`, 2025-03-07)"
and some other builtin commands, the help test was added into their
respective test files. Since it better fits thats tests that check
command behavior outside a repository should be in t/t1517-outside-repo.sh.
Patrick suggest moving the test to t/t1517-outside-repo.sh.

This patch series moved the all the test.

Changes since v3:
  - Fix the typo which I thought I was able to fix in v2

Usman Akinyemi (7):
  t/t1517: move checkout-index -h test to t1517
  t/t1517: move for-each-ref -h test to t1517
  t/t1517: move ls-files -h test to t1517
  t/t1517: move pack-refs -h test to t1517
  t/t1517: move send-pack -h test to t1517
  t/t1517: move verify-commit -h test to t1517
  t/t1517: move verify-tag -h test to t1517

 t/t0610-reftable-basics.sh      |  7 -----
 t/t1517-outside-repo.sh         | 49 +++++++++++++++++++++++++++++++++
 t/t2006-checkout-index-basic.sh |  7 -----
 t/t3004-ls-files-basic.sh       |  7 -----
 t/t5400-send-pack.sh            |  7 -----
 t/t6300-for-each-ref.sh         |  7 -----
 t/t7030-verify-tag.sh           |  7 -----
 t/t7510-signed-commit.sh        |  7 -----
 8 files changed, 49 insertions(+), 49 deletions(-)

-- 
2.50.0


From mboxrd@z Thu Jan  1 00:00:00 1970
Received: from mail-pl1-f175.google.com (mail-pl1-f175.google.com [209.85.214.175])
	(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
	(No client certificate requested)
	by smtp.subspace.kernel.org (Postfix) with ESMTPS id AF5081F5413
	for <git@vger.kernel.org>; Sun,  6 Jul 2025 21:50:49 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.175
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
	t=1751838651; cv=none; b=hNq0pyADxq44cXWh4oyH1dDVoTMOnSbDS6melF1Ph6PipZDMQJKphfSsR03erknTWAYeBFISg8SoAlJD9rvBr+YMQZFu/cNefvmp3ELnnk9nM4WtHEPVp0z6jVkZbGe9p+rtnw7kBRc/k3NH6eUmnjNELeIFNFR3/epqiKBJucQ=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
	s=arc-20240116; t=1751838651; c=relaxed/simple;
	bh=bEN9Abk81MkzI7KSOCp+jAjQ/SlkCTz4r8nRJSZvLDg=;
	h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References:
	 MIME-Version; b=I4Zpa+JpIjMjp5WRa0YsNaFSG2eIyjfoCC4kMoyBsTYD94KI15rsLDpjS2v3OHuqD+AHLWUxeq7p+3aqH9TQCVHdPjXykET+3myBeU6HweasxB4/BQ6NbNT/mc/FXrRweuRKinrRaqKY2uQUv9JzHc2/RAYHDUUCxmgCIKXOcyA=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=I2wDw8D5; arc=none smtp.client-ip=209.85.214.175
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.b="I2wDw8D5"
Received: by mail-pl1-f175.google.com with SMTP id d9443c01a7336-235f9ea8d08so20689465ad.1
        for <git@vger.kernel.org>; Sun, 06 Jul 2025 14:50:49 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=20230601; t=1751838649; x=1752443449; darn=vger.kernel.org;
        h=content-transfer-encoding:mime-version:references:in-reply-to
         :message-id:date:subject:cc:to:from:from:to:cc:subject:date
         :message-id:reply-to;
        bh=izLJ3X4QBDd9R2XB7ByvIGXW4OxeWPzNCyqdvU4COCk=;
        b=I2wDw8D5a7UIAIkpeD78GzmQiW3KsReYi7D7hDwTmIoLUPBdIpNFKIwtOieJqCiKoU
         Q3Zs528TxUomPuzJmxQbcyrc9GACX23n5ZNaNHSXF3sYZ40cVMXD8BirIXgC3R1kbUsw
         Eb9x+lCMBp2I3MT+bvXAvfkvq6qaBVSWnFSXfN3dizUAawkcrPrWAmXxjw1QWmM2PW4K
         pDbuJ1mWnyurFzuw/HPyysV+cCRg8BFdDUAt0JFqMhL94qlidGsBYXP2GCoMQOBT94bZ
         V1gLVFnAj6WrCaZwMRGwwzn7W8V03rnkTDBpsam2BGqSi6JHb/7a6xcpIwdo3paO89Mu
         FwEQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20230601; t=1751838649; x=1752443449;
        h=content-transfer-encoding:mime-version:references:in-reply-to
         :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc
         :subject:date:message-id:reply-to;
        bh=izLJ3X4QBDd9R2XB7ByvIGXW4OxeWPzNCyqdvU4COCk=;
        b=F900CSPvPIa6zzUMSa3+Fj14wrQXityhiTAvm0E7isOOQS7mTQwpaB4+ISTRNBI/FM
         cQA1egXGZ8IsSCAogJe6TIlx2OJgqg3yraC8Wo+51D4YhT6wiw6h661pFCV2uvBYVETD
         MCBFjm5SmDsvEbwwB7kmiCE6IAZQiCXCqfuca0ysGfF8yhUZAdeIgbgikQQqtFB4s46T
         FwOZtfSzgpNX4uENGTbucHEcRGVpI42FANozrSz+H8XeG9BQUSSMSbkT/QxZF1hsPYv+
         z0leJWOgOHPeRFJsYTLdrOuv6Q96RcMOqtMjIERdQ/V8yNvp61fefmGB0+e3nB4IiWfw
         GpDQ==
X-Forwarded-Encrypted: i=1; AJvYcCUGhURrZwnuyGvTXgDL5dDsLWj8dRJQjETb1vAYFUG+MU4lXw/ECUYEk3Ufnm1t4kH2m9c=@vger.kernel.org
X-Gm-Message-State: AOJu0YwEvGvQKYmebUqNWY+k3SU6L7A/OkIz4fHNwE9rv34XivxAc3Co
	4I1hsKvcdtojA6qTI4hb28IJk6i45pj0PbpwfQcitguqzvVfZJ3NgEP9m1UXqGRBPa4=
X-Gm-Gg: ASbGncs28dpWCUATmtiupIqpW2pKGLRB8EP65CZVAl7NlicRkau7/JmZaFR41Pv7/wD
	rlj+ztWaVcbkZhZKF+F2vqUjrpjveRDIqex8A32jQypbmbAc7Nb6BQ6oJd9IBYPbNFSEZP92XZ9
	LWewqI53j4mlwFZZMwG2dbYVrwevLLdbtVdLQ9b2HRVSgjR8eeUmX0Co5oKQTGIZEOq8BWVtr4l
	uKQogCmgcEgSKy3UvZLxmG0m5C7K3nFMr2DWccTqASLtHUqO3e0iige5jsHB7eQjeLSTl1aJtS6
	Sli2Cdj852Wq3Gk/Q6HkzXQ9O1ntaIxEarOKvAu77aIyA9pzGIMwmBazi3kpefQaxLi4hFrvzZT
	zHpiLW/UvUoM=
X-Google-Smtp-Source: AGHT+IG70BNuhhtF30fFzO9P5DUzADkLiD0h6e8ot8mc25wF+6+NAFXflS6gL8JfF3Lw8T+T4SYtLA==
X-Received: by 2002:a17:902:d4cc:b0:236:8df7:b30a with SMTP id d9443c01a7336-23c90f92800mr118193645ad.1.1751838648917;
        Sun, 06 Jul 2025 14:50:48 -0700 (PDT)
Received: from archlinux.plaksha.edu.in ([202.164.41.66])
        by smtp.gmail.com with ESMTPSA id d9443c01a7336-23c8457f308sm72912335ad.149.2025.07.06.14.50.46
        (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
        Sun, 06 Jul 2025 14:50:48 -0700 (PDT)
From: Usman Akinyemi <usmanakinyemi202@gmail.com>
To: usmanakinyemi202@gmail.com,
	git@vger.kernel.org
Cc: chriscool@tuxfamily.org,
	christian.couder@gmail.com,
	gitster@pobox.com,
	me@ttaylorr.com,
	ps@pks.im
Subject: [PATCH v3 1/7] t/t1517: move checkout-index -h test to t1517
Date: Mon,  7 Jul 2025 03:20:33 +0530
Message-ID: <20250706215039.715732-2-usmanakinyemi202@gmail.com>
X-Mailer: git-send-email 2.50.0
In-Reply-To: <20250706215039.715732-1-usmanakinyemi202@gmail.com>
References: <20250706214108.714499-1-usmanakinyemi202@gmail.com>
 <20250706215039.715732-1-usmanakinyemi202@gmail.com>
Precedence: bulk
X-Mailing-List: git@vger.kernel.org
List-Id: <git.vger.kernel.org>
List-Subscribe: <mailto:git+subscribe@vger.kernel.org>
List-Unsubscribe: <mailto:git+unsubscribe@vger.kernel.org>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit

The test 'checkout-index does not crash with -h' checks that
the command exits cleanly with usage information, both inside and
outside of a repository.

Move this test from "t2006-checkout-index-basic.sh" to
"t1517-outside-repo.sh" since it better fits with tests that check
command behavior outside a repository.

Suggested-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Usman Akinyemi <usmanakinyemi202@gmail.com>
---
 t/t1517-outside-repo.sh         | 7 +++++++
 t/t2006-checkout-index-basic.sh | 7 -------
 2 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/t/t1517-outside-repo.sh b/t/t1517-outside-repo.sh
index 6824581317..9e54214725 100755
--- a/t/t1517-outside-repo.sh
+++ b/t/t1517-outside-repo.sh
@@ -114,4 +114,11 @@ test_expect_success 'update-server-info does not crash with -h' '
 	test_grep "[Uu]sage: git update-server-info " usage
 '
 
+test_expect_success 'checkout-index does not crash with -h' '
+	test_expect_code 129 git checkout-index -h >usage &&
+	test_grep "[Uu]sage: git checkout-index " usage &&
+	test_expect_code 129 nongit git checkout-index -h >usage &&
+	test_grep "[Uu]sage: git checkout-index " usage
+'
+
 test_done
diff --git a/t/t2006-checkout-index-basic.sh b/t/t2006-checkout-index-basic.sh
index fedd2cc097..bac231b167 100755
--- a/t/t2006-checkout-index-basic.sh
+++ b/t/t2006-checkout-index-basic.sh
@@ -21,13 +21,6 @@ test_expect_success 'checkout-index -h in broken repository' '
 	test_grep "[Uu]sage" broken/usage
 '
 
-test_expect_success 'checkout-index does not crash with -h' '
-	test_expect_code 129 git checkout-index -h >usage &&
-	test_grep "[Uu]sage: git checkout-index " usage &&
-	test_expect_code 129 nongit git checkout-index -h >usage &&
-	test_grep "[Uu]sage: git checkout-index " usage
-'
-
 test_expect_success 'checkout-index reports errors (cmdline)' '
 	test_must_fail git checkout-index -- does-not-exist 2>stderr &&
 	test_grep not.in.the.cache stderr
-- 
2.50.0


From mboxrd@z Thu Jan  1 00:00:00 1970
Received: from mail-pl1-f180.google.com (mail-pl1-f180.google.com [209.85.214.180])
	(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
	(No client certificate requested)
	by smtp.subspace.kernel.org (Postfix) with ESMTPS id 72E7125DB0A
	for <git@vger.kernel.org>; Sun,  6 Jul 2025 21:50:52 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.180
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
	t=1751838653; cv=none; b=fbCSGp7kBwvGJ/CnqD3NFAUkjkQFqDPdUKl7gFIqV0YBz3fDyzYKQQFxlRrU0+B1TVSoSrY2Xc8rbN5+Qh/3g7JtehKXAZgI1mBp1aCPKcAZDX/kt9lNQAleYA7wByS2tlOYKgitGXBTbaYuK1o/JDDmIR8fgtEqcsgaJBYnD9E=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
	s=arc-20240116; t=1751838653; c=relaxed/simple;
	bh=UcVCqRZEuB6SSpJUX1wa+Ubj01MjQE9m/dU74Ux2/1k=;
	h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References:
	 MIME-Version; b=DpJnjm7Yr/D25zUPHiw1R8NG5B4BAR8GmwgQvSuu0RTyqp7Xz7WP4ZGtk3TXvtqzJtq10NuYmHVnJtF4tc0M68ubq2fyTTHA1IvwTp8L0sYT15r5F9IE94yW+orCjriiWW1bfh1x5mpjozqTpgRuR6Uuy2zLCEpTus4KW8xvKx0=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=b52Eg1f+; arc=none smtp.client-ip=209.85.214.180
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.b="b52Eg1f+"
Received: by mail-pl1-f180.google.com with SMTP id d9443c01a7336-234b440afa7so24476525ad.0
        for <git@vger.kernel.org>; Sun, 06 Jul 2025 14:50:52 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=20230601; t=1751838652; x=1752443452; darn=vger.kernel.org;
        h=content-transfer-encoding:mime-version:references:in-reply-to
         :message-id:date:subject:cc:to:from:from:to:cc:subject:date
         :message-id:reply-to;
        bh=rPN5CmfpTqkO/Jro13cfwG1DiT4PtHinY2VqqndLfaI=;
        b=b52Eg1f+QV7MU5hq6UeT/9tVEfR0Vk1JVgeAnlrwm6EbXvrFHUc78TEELqob8SkAv0
         ridwP3woiTVZVc+EkSk3jYZIGuZbExB0xa3/mCMlrSBCY1WYj1zBXOBAZYJauMnum/7y
         OQcu8DNn6C3SJyRVN5EqCxqbPfLFXGKCantVtfMGl7xrkUu7tyI0E3buFMEPzHY9jSlj
         LLzmFXyZsEs76CrnzQsheNfjZJeoO2Ih4fNjWxMbrM4YfHv/8UFwyQuRnaOS7UqshJwB
         egsZBtv8OKHkbgT5sgICeV3A/ezEjKtMXMgl6yWffVFq+ROTaE9DYrmfddzWUEWh2vvJ
         Q5qg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20230601; t=1751838652; x=1752443452;
        h=content-transfer-encoding:mime-version:references:in-reply-to
         :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc
         :subject:date:message-id:reply-to;
        bh=rPN5CmfpTqkO/Jro13cfwG1DiT4PtHinY2VqqndLfaI=;
        b=GRTZ2lgRk2Pe33WLYj+TUEl53XUT3Dx2g1oZnCZ+Ia0AedN3j5IMgXuRn4xLjoRLVn
         tmjX/r9NiyB7bdF1N7YdSqkIhv39koN58F2VWulp8orrZS/AVVN5nLs3R8+Eo08VTeyW
         0z9EuESpFntyHf55XwSIgxYgmR8QgqAuiQZrzTRJ3lrbQbza02E93RaK7qhFcFkU9VIX
         CYgsZ/z97925MbzKibU15rGrKZ2eChpBUK8AKy3Qqtd/sGGbmB69uG+Gl9ridsBqsFfd
         +f46cDDGGSgswMBOpvtnh6uV024VQFuEHsulgB81qXhbz4xmXW1GjYpB1hllmB+ws0HE
         Eyeg==
X-Forwarded-Encrypted: i=1; AJvYcCXLAMIxId2FmYqIuSqSpnAz80pIzzFiU5o2Nr1gNSSFPm8EPTg2Ht83yd5RmR4jnS3sSQ4=@vger.kernel.org
X-Gm-Message-State: AOJu0YwSEDbrZ4ZBoP/epZj/ijxX7unD8b0DS84O0IPxODNifSCUl4P2
	WxgpADfBajIoPNjLxsWoJPVPMbPJotxfKx1wMQsk2giIi2fIy86tUJbw
X-Gm-Gg: ASbGnct962mXbEvEycf+jbpQYfX05tmbwQ4hbvvMl7igChPPH9nFaisZcUa6+OtRCoT
	kB9s2VSXXhSp/qHwrthtUxyNoCR5M7Zm68QKxH1ANWyWcXZMkHo0C/dmGh5qVTXFast8OZ70xYl
	7T/c1V2DFmYyd7IkQE4EoI9a/cedE2Mv+j7k47Cd9Ws/JsKmaDe9FBATllQ/kD+rrr0uX3Q445d
	x31OvN9l5Mjb5Rd87Pzj8b1zWsPtx97voFruy/b9uw0dfNOXv6/x9206xTImJHfQrDWauaSl0f+
	CvtEa1LBp6MtaQuAAWVLb16FXr2SFpZtNv1cv8pSC5daUQpQw84lXIF1edSs1WyKqCuRn+YD4b+
	WMw0XuNb5uFyqEIxmiCIC4A==
X-Google-Smtp-Source: AGHT+IF2MaPDPvPU3WXZ8I9GnkqQTJ/LQyNlk835eeSjDSz3NueOzOf6bXiPvuiZeAZUBHp4CXkRiA==
X-Received: by 2002:a17:903:610:b0:235:5a9:976f with SMTP id d9443c01a7336-23c90fc7db2mr69357135ad.24.1751838651792;
        Sun, 06 Jul 2025 14:50:51 -0700 (PDT)
Received: from archlinux.plaksha.edu.in ([202.164.41.66])
        by smtp.gmail.com with ESMTPSA id d9443c01a7336-23c8457f308sm72912335ad.149.2025.07.06.14.50.49
        (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
        Sun, 06 Jul 2025 14:50:51 -0700 (PDT)
From: Usman Akinyemi <usmanakinyemi202@gmail.com>
To: usmanakinyemi202@gmail.com,
	git@vger.kernel.org
Cc: chriscool@tuxfamily.org,
	christian.couder@gmail.com,
	gitster@pobox.com,
	me@ttaylorr.com,
	ps@pks.im
Subject: [PATCH v3 2/7] t/t1517: move for-each-ref -h test to t1517
Date: Mon,  7 Jul 2025 03:20:34 +0530
Message-ID: <20250706215039.715732-3-usmanakinyemi202@gmail.com>
X-Mailer: git-send-email 2.50.0
In-Reply-To: <20250706215039.715732-1-usmanakinyemi202@gmail.com>
References: <20250706214108.714499-1-usmanakinyemi202@gmail.com>
 <20250706215039.715732-1-usmanakinyemi202@gmail.com>
Precedence: bulk
X-Mailing-List: git@vger.kernel.org
List-Id: <git.vger.kernel.org>
List-Subscribe: <mailto:git+subscribe@vger.kernel.org>
List-Unsubscribe: <mailto:git+unsubscribe@vger.kernel.org>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit

The test 'for-each-ref does not crash with -h' checks that
the command exits cleanly with usage information, both inside and
outside of a repository.

Move this test from "t6300-for-each-ref.sh" to
"t1517-outside-repo.sh" since it better fits with tests that check
command behavior outside a repository.

Suggested-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Usman Akinyemi <usmanakinyemi202@gmail.com>
---
 t/t1517-outside-repo.sh | 7 +++++++
 t/t6300-for-each-ref.sh | 7 -------
 2 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/t/t1517-outside-repo.sh b/t/t1517-outside-repo.sh
index 9e54214725..d3487acbfc 100755
--- a/t/t1517-outside-repo.sh
+++ b/t/t1517-outside-repo.sh
@@ -121,4 +121,11 @@ test_expect_success 'checkout-index does not crash with -h' '
 	test_grep "[Uu]sage: git checkout-index " usage
 '
 
+test_expect_success 'for-each-ref does not crash with -h' '
+	test_expect_code 129 git for-each-ref -h >usage &&
+	test_grep "[Uu]sage: git for-each-ref " usage &&
+	test_expect_code 129 nongit git for-each-ref -h >usage &&
+	test_grep "[Uu]sage: git for-each-ref " usage
+'
+
 test_done
diff --git a/t/t6300-for-each-ref.sh b/t/t6300-for-each-ref.sh
index ce9af79ab1..5db7038c41 100755
--- a/t/t6300-for-each-ref.sh
+++ b/t/t6300-for-each-ref.sh
@@ -292,13 +292,6 @@ test_expect_success 'Check invalid atoms names are errors' '
 	test_must_fail git for-each-ref --format="%(INVALID)" refs/heads
 '
 
-test_expect_success 'for-each-ref does not crash with -h' '
-	test_expect_code 129 git for-each-ref -h >usage &&
-	test_grep "[Uu]sage: git for-each-ref " usage &&
-	test_expect_code 129 nongit git for-each-ref -h >usage &&
-	test_grep "[Uu]sage: git for-each-ref " usage
-'
-
 test_expect_success 'Check format specifiers are ignored in naming date atoms' '
 	git for-each-ref --format="%(authordate)" refs/heads &&
 	git for-each-ref --format="%(authordate:default) %(authordate)" refs/heads &&
-- 
2.50.0


From mboxrd@z Thu Jan  1 00:00:00 1970
Received: from mail-pl1-f171.google.com (mail-pl1-f171.google.com [209.85.214.171])
	(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
	(No client certificate requested)
	by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6E4501F75A6
	for <git@vger.kernel.org>; Sun,  6 Jul 2025 21:50:55 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.171
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
	t=1751838657; cv=none; b=srpDX6db9bXeaO802ATWCUWMZUbReQpZawgASzZmRr+pcv9IB8xTz8UKmW2fL3vEd6lNScS30w3GRuVpbY3fEF8GsA/nR3VAWdAfM3/ekTPi33Je9G0bHlrz/uoSjbA/TRzvTSRre4Hl5HdQqG0IbJ0PBd74EqGTrqSSL7faRaw=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
	s=arc-20240116; t=1751838657; c=relaxed/simple;
	bh=lu9jBuDrAKf7yQNNgZInvWV5/bJmdrSlUz/XNKoutMI=;
	h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References:
	 MIME-Version; b=aZuL90c1KhLqaTz7FfhEuVtUpMT7idzvVJy4Rey0Udqfj3gmVb7AYXlXPOGXPy4T+gUrB0QyyI5sR7Nz3vm+GtnBq0TPEySMYefN7l6Gu/67XfuYpk6Nkuje6QodXa6mrnbPadFlNNTVmzIFdfsfi8HqsK4y73iEXSQb6eDWi7U=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=gazmzvGK; arc=none smtp.client-ip=209.85.214.171
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.b="gazmzvGK"
Received: by mail-pl1-f171.google.com with SMTP id d9443c01a7336-23c703c471dso28934815ad.0
        for <git@vger.kernel.org>; Sun, 06 Jul 2025 14:50:55 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=20230601; t=1751838655; x=1752443455; darn=vger.kernel.org;
        h=content-transfer-encoding:mime-version:references:in-reply-to
         :message-id:date:subject:cc:to:from:from:to:cc:subject:date
         :message-id:reply-to;
        bh=e+dUBWdLiWs8LXQUWYmiLFU5qfDINRC4rx8DSKKZEYI=;
        b=gazmzvGKYmUJpsZMehPyF2bteQmePCeaNoxmB0E2k+JKblLs5xfZFZE8qH0d/6ozv9
         v2aeyZWWPmv5ez/qaBD7ZXNkggQHQsHv6/RYnFJm6zI1oztfquuzyVXK1MaLFIwA8LaT
         Z0zv+qbcTJum46pMbeaFLTVLCvYXO58Lh/iTsoNRok79i66mW5h7jhPpesV4agDGoaxm
         FmH1NRxTFKGQpBAYFcfp3A5KKq5n8n0etQn8DioC6KBNkGYCHaenXBd0o4ECN6UQi1HD
         ri0sjei+JE0a4V4os/L8r/vdlOym93Pf4lViZ9ULUwh5e9ZrOjQPyOBwlTJGB5YtlDJ0
         dSTw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20230601; t=1751838655; x=1752443455;
        h=content-transfer-encoding:mime-version:references:in-reply-to
         :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc
         :subject:date:message-id:reply-to;
        bh=e+dUBWdLiWs8LXQUWYmiLFU5qfDINRC4rx8DSKKZEYI=;
        b=DDbWx4daG0DBUHxPCskOqTQAoWTzOwdlmIP0M2S7wiUIo/floNG3Im6S4wKXJiTBDG
         lNc3HCBSJSUp7DNjdojQklzPSnnrz39ps7IIf+Ke4zBDitEwTBSv97dRCLkthgF1k+dO
         KRhuvPieFUW+L02o8+NU4T+Z9BMTL4+qKy+JqP+AQJtS7zwV7xEA0oeKbDFjyrOnnW4X
         poV59tT4kwCdQf5S3iOU/2Pew1OcNGqziEeYIM360we4qOBvBt6AqWn350ujp2cRfUq1
         MAy/9VBFTA9YCi20t3l7al9TCsxc/LUVDrRbiBoex4DYgLF8Zq65GCZKC1druZ5e2HfW
         wfPQ==
X-Forwarded-Encrypted: i=1; AJvYcCWvVVab6EANLIRZQQvNRWhj6vGUNxQm/dszBe+Sz+Z6uxlOkbQi4+m38JPIda5VtPjYGsw=@vger.kernel.org
X-Gm-Message-State: AOJu0Yz7r7t02v9MSRHI1M1+GCOxCMEi500KLuCdJQMwrzQiN7VpJ85A
	PBfWMqmvIHy0Co6jyl8DoSqByHOKN0CBUWVhFYv12zVf/w75xyVXiAAsWDM9meQ/snw=
X-Gm-Gg: ASbGnct91rHeXw0jw3fYXqBkz9O9UWAIRawcW98qQCnecKPXYMLbcXBkKbvdzJXS+5n
	KDsJFDOARFULeyHpctYe6i5ZubfrslIstBudDP/TBkq/KeYtv0LuLSmUd9wtFuJ+ip4pC7TfKWK
	FoL1pcTJsYA09RgvwZl3mdRn8oQvBx21lF3kIJH5HcSsDHtvv49tZtrTOiMNOfPzFj0mjDK2KKf
	BcYFqkZEL5IEYOe6e80PCOr8LrMyd9/jSZlrqzVpD2+Pa/JHsl6msSoNzULLXN2VXZQHYh9b4kP
	21XACTGCZ/zXf2NeAMU+JV4v4+8M8HKL3yJJrv7lcxnNdkswMQA3nbzoY6NOZUmGdJj64/m2Sxi
	tb53PaaxForA=
X-Google-Smtp-Source: AGHT+IGFBIMf9dZjf3LhvdQiDcTU8G2dCdJsNpdGh4ToZxBFLxVZtEBOjLr9BUEQ+RICEII1+V5jBA==
X-Received: by 2002:a17:903:2acc:b0:231:c3c1:babb with SMTP id d9443c01a7336-23c85951fd8mr144508715ad.18.1751838654665;
        Sun, 06 Jul 2025 14:50:54 -0700 (PDT)
Received: from archlinux.plaksha.edu.in ([202.164.41.66])
        by smtp.gmail.com with ESMTPSA id d9443c01a7336-23c8457f308sm72912335ad.149.2025.07.06.14.50.52
        (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
        Sun, 06 Jul 2025 14:50:54 -0700 (PDT)
From: Usman Akinyemi <usmanakinyemi202@gmail.com>
To: usmanakinyemi202@gmail.com,
	git@vger.kernel.org
Cc: chriscool@tuxfamily.org,
	christian.couder@gmail.com,
	gitster@pobox.com,
	me@ttaylorr.com,
	ps@pks.im
Subject: [PATCH v3 3/7] t/t1517: move ls-files -h test to t1517
Date: Mon,  7 Jul 2025 03:20:35 +0530
Message-ID: <20250706215039.715732-4-usmanakinyemi202@gmail.com>
X-Mailer: git-send-email 2.50.0
In-Reply-To: <20250706215039.715732-1-usmanakinyemi202@gmail.com>
References: <20250706214108.714499-1-usmanakinyemi202@gmail.com>
 <20250706215039.715732-1-usmanakinyemi202@gmail.com>
Precedence: bulk
X-Mailing-List: git@vger.kernel.org
List-Id: <git.vger.kernel.org>
List-Subscribe: <mailto:git+subscribe@vger.kernel.org>
List-Unsubscribe: <mailto:git+unsubscribe@vger.kernel.org>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit

The test 'ls-files does not crash with -h' checks that
the command exits cleanly with usage information, both inside and
outside of a repository.

Move this test from "t3004-ls-files-basic.sh" to
"t1517-outside-repo.sh" since it better fits with tests that check
command behavior outside a repository.

Suggested-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Usman Akinyemi <usmanakinyemi202@gmail.com>
---
 t/t1517-outside-repo.sh   | 7 +++++++
 t/t3004-ls-files-basic.sh | 7 -------
 2 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/t/t1517-outside-repo.sh b/t/t1517-outside-repo.sh
index d3487acbfc..206b9e118c 100755
--- a/t/t1517-outside-repo.sh
+++ b/t/t1517-outside-repo.sh
@@ -128,4 +128,11 @@ test_expect_success 'for-each-ref does not crash with -h' '
 	test_grep "[Uu]sage: git for-each-ref " usage
 '
 
+test_expect_success 'ls-files does not crash with -h' '
+	test_expect_code 129 git ls-files -h >usage &&
+	test_grep "[Uu]sage: git ls-files " usage &&
+	test_expect_code 129 nongit git ls-files -h >usage &&
+	test_grep "[Uu]sage: git ls-files " usage
+'
+
 test_done
diff --git a/t/t3004-ls-files-basic.sh b/t/t3004-ls-files-basic.sh
index 4034a5a59f..a1078f8701 100755
--- a/t/t3004-ls-files-basic.sh
+++ b/t/t3004-ls-files-basic.sh
@@ -34,13 +34,6 @@ test_expect_success 'ls-files -h in corrupt repository' '
 	test_grep "[Uu]sage: git ls-files " broken/usage
 '
 
-test_expect_success 'ls-files does not crash with -h' '
-	test_expect_code 129 git ls-files -h >usage &&
-	test_grep "[Uu]sage: git ls-files " usage &&
-	test_expect_code 129 nongit git ls-files -h >usage &&
-	test_grep "[Uu]sage: git ls-files " usage
-'
-
 test_expect_success SYMLINKS 'ls-files with absolute paths to symlinks' '
 	mkdir subs &&
 	ln -s nosuch link &&
-- 
2.50.0


From mboxrd@z Thu Jan  1 00:00:00 1970
Received: from mail-pl1-f176.google.com (mail-pl1-f176.google.com [209.85.214.176])
	(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
	(No client certificate requested)
	by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6B8841F9F51
	for <git@vger.kernel.org>; Sun,  6 Jul 2025 21:50:58 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.176
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
	t=1751838659; cv=none; b=BGfXicKpksJZjl9XmjiAbadt+QktvIybhM5+Wx33uPqHnaF9xJWrty/zCxEw3bfv5HGZhb8o37G1rc5Fu5n+yIUCX29liuWdNpXgj5V3UBDxRptCgMGhXjOoSHHV6rCdvUnEbY8gFQxWK1LqJ0Ouy82M4TH5eqFe9A7z+T6FhCU=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
	s=arc-20240116; t=1751838659; c=relaxed/simple;
	bh=fj37tRamx0e1x0vv+ekaKGrltfwXc8pcBrk7jSe7pjE=;
	h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References:
	 MIME-Version; b=XirRiAofAcX4dR/gGbTpdK8itmJ+VzGGws+DakDH7lSLyDGcCmv+FsJEkN8LBnjHR0w6O0m8yk1Pp2L/A7HHroSHZJPR58m7gdrLF0RoEt5eIjB4xZRSpAzfeJna1ZeMI9+YxCjDtPzvjElEz7wCa7DDzW2LbeEkq7/bVC+UA30=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=m7AEdG0e; arc=none smtp.client-ip=209.85.214.176
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.b="m7AEdG0e"
Received: by mail-pl1-f176.google.com with SMTP id d9443c01a7336-236377f00easo31239325ad.1
        for <git@vger.kernel.org>; Sun, 06 Jul 2025 14:50:58 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=20230601; t=1751838658; x=1752443458; darn=vger.kernel.org;
        h=content-transfer-encoding:mime-version:references:in-reply-to
         :message-id:date:subject:cc:to:from:from:to:cc:subject:date
         :message-id:reply-to;
        bh=vPjBO+O2gFc0G5JVbq1wDdwIhbV/xaTkzGOd9VIDcGQ=;
        b=m7AEdG0eZzNheBCMzR2KQP5PNx5/OTNUywrFvyEiGZXH2BjgdtL92Ddm/n9ZJ/SSRB
         I78tZq1SpATcjaABSzCIn9AJooLFEfH27w7qlULXsr3F/1YClHns5KQ0v7yLMwEiuvBS
         Ur6iAequGqvLQMZ+q9/AOF3CkTG1+hEUHMxrnBGaMYxWTY4zc/lQ619V+ftDtWACsgav
         kfzJf4hi8F57Tpqct9cfm1jjkf5+qq9A5A2wLtfGm+v2uO5lCLSRCDc4NGNF+C/lSEiO
         xjsDP9g1zi6dTTtJHTAelv55pL8vhCDjcEWLel1ytHNBosDkG2dgNsk0tBUQM2fPEbWV
         3xlA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20230601; t=1751838658; x=1752443458;
        h=content-transfer-encoding:mime-version:references:in-reply-to
         :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc
         :subject:date:message-id:reply-to;
        bh=vPjBO+O2gFc0G5JVbq1wDdwIhbV/xaTkzGOd9VIDcGQ=;
        b=EZzj/bxIsICmRh8hMz496gO4KIjrrqpBA6zLagr/C88JcBpwXl7ett5ng3QVITFNeP
         u0Obtidff5s+5ZeyC5jADGz+WIf6X6mYUN/wSbmy+ZkfBSgesEGwlsufiMiuhAUMx48Z
         win4Dy5hR5kPGGtRtQBkTL7SgrdHHRz8DwJL6l9frQFE1bvLqjuFt4XcDsxabQXLO6LH
         gt3e9RkltB/qwNNYTvAXBhwe5SvCwxsas99EacvrqwJ8TZsU6tg82YZ3WCDb12K6ftzy
         3JwRuj4mZqXiyWfN71Tb3bl5MABUoYbEcyiWTLY7TbJEC8HgXTgbuExEzNCeaFrMZiMF
         0oGg==
X-Forwarded-Encrypted: i=1; AJvYcCUG0I6+ppaq5sTM5Jibu3QsIjL0VOE2vaUFg0759SDxP+EfbmreXG2onjl/j7VTC6+5pns=@vger.kernel.org
X-Gm-Message-State: AOJu0YwwcMYnIKaHyJHwjydshDkYNlw3SDaoxR+/B57RLh6TUoIGxdw3
	282NC0jEjx4E9b4tKBSPsBZ45t1NkDPRzDkU/oqc3hLXVJZxIcK58+TO
X-Gm-Gg: ASbGncsfALD9yueCG84j7aUZmOSsKq3uyLfyFnq97R3Lh4N/fthw/PzPKmm+zCN3Alb
	P7zRlcbJwkZkQ2HeLfs1tYcz9nvKnE3/sBnaf8ZydLXH4WcwV13z3v8oCyivnVxFLG+q+eOZTZL
	zXup1NqqWoku3ByXyXpAUidzA9v6VJXU8nvBHV9nwUq4sn6VIyh7vUcFvWT2P3gSlTegkvMTIFZ
	0K5Kl9xCr+0EOUPgRA2uc4ZAkpUB6ma1JJh9DTYbNwT6xo1Y6SL6iUmCN86pxTxa1WjgED+MV0t
	t9n1lHC/pBlZNFFoO2CmdmUcB6UYtwH/3gOlZx5z6MvW2SapxvtBci9QS/7PmxBuUmhN04l+v47
	ted5bXdwTX+c=
X-Google-Smtp-Source: AGHT+IFN2WCsDM/52fHK9f7n8ZWtBRyhh4+izILF46t67eZHS3s1iFV96fZaSp99zHuXjzZJFILOXQ==
X-Received: by 2002:a17:902:d592:b0:235:799:eca5 with SMTP id d9443c01a7336-23c85eb051dmr174867815ad.44.1751838657704;
        Sun, 06 Jul 2025 14:50:57 -0700 (PDT)
Received: from archlinux.plaksha.edu.in ([202.164.41.66])
        by smtp.gmail.com with ESMTPSA id d9443c01a7336-23c8457f308sm72912335ad.149.2025.07.06.14.50.55
        (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
        Sun, 06 Jul 2025 14:50:57 -0700 (PDT)
From: Usman Akinyemi <usmanakinyemi202@gmail.com>
To: usmanakinyemi202@gmail.com,
	git@vger.kernel.org
Cc: chriscool@tuxfamily.org,
	christian.couder@gmail.com,
	gitster@pobox.com,
	me@ttaylorr.com,
	ps@pks.im
Subject: [PATCH v3 4/7] t/t1517: move pack-refs -h test to t1517
Date: Mon,  7 Jul 2025 03:20:36 +0530
Message-ID: <20250706215039.715732-5-usmanakinyemi202@gmail.com>
X-Mailer: git-send-email 2.50.0
In-Reply-To: <20250706215039.715732-1-usmanakinyemi202@gmail.com>
References: <20250706214108.714499-1-usmanakinyemi202@gmail.com>
 <20250706215039.715732-1-usmanakinyemi202@gmail.com>
Precedence: bulk
X-Mailing-List: git@vger.kernel.org
List-Id: <git.vger.kernel.org>
List-Subscribe: <mailto:git+subscribe@vger.kernel.org>
List-Unsubscribe: <mailto:git+unsubscribe@vger.kernel.org>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit

The test 'pack-refs does not crash with -h' checks that
the command exits cleanly with usage information, both inside and
outside of a repository.

Move this test from "t0610-reftable-basics.sh" to
"t1517-outside-repo.sh" since it better fits with tests that check
command behavior outside a repository.

Suggested-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Usman Akinyemi <usmanakinyemi202@gmail.com>
---
 t/t0610-reftable-basics.sh | 7 -------
 t/t1517-outside-repo.sh    | 7 +++++++
 2 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/t/t0610-reftable-basics.sh b/t/t0610-reftable-basics.sh
index 3ea5d51532..ffd8ecc0ce 100755
--- a/t/t0610-reftable-basics.sh
+++ b/t/t0610-reftable-basics.sh
@@ -14,13 +14,6 @@ export GIT_TEST_DEFAULT_REF_FORMAT
 
 INVALID_OID=$(test_oid 001)
 
-test_expect_success 'pack-refs does not crash with -h' '
-	test_expect_code 129 git pack-refs -h >usage &&
-	test_grep "[Uu]sage: git pack-refs " usage &&
-	test_expect_code 129 nongit git pack-refs -h >usage &&
-	test_grep "[Uu]sage: git pack-refs " usage
-'
-
 test_expect_success 'init: creates basic reftable structures' '
 	test_when_finished "rm -rf repo" &&
 	git init repo &&
diff --git a/t/t1517-outside-repo.sh b/t/t1517-outside-repo.sh
index 206b9e118c..39e7842c9e 100755
--- a/t/t1517-outside-repo.sh
+++ b/t/t1517-outside-repo.sh
@@ -135,4 +135,11 @@ test_expect_success 'ls-files does not crash with -h' '
 	test_grep "[Uu]sage: git ls-files " usage
 '
 
+test_expect_success 'pack-refs does not crash with -h' '
+	test_expect_code 129 git pack-refs -h >usage &&
+	test_grep "[Uu]sage: git pack-refs " usage &&
+	test_expect_code 129 nongit git pack-refs -h >usage &&
+	test_grep "[Uu]sage: git pack-refs " usage
+'
+
 test_done
-- 
2.50.0


From mboxrd@z Thu Jan  1 00:00:00 1970
Received: from mail-pl1-f178.google.com (mail-pl1-f178.google.com [209.85.214.178])
	(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
	(No client certificate requested)
	by smtp.subspace.kernel.org (Postfix) with ESMTPS id AF1C1288518
	for <git@vger.kernel.org>; Sun,  6 Jul 2025 21:51:01 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.178
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
	t=1751838663; cv=none; b=Zqapr1357eTWzRze5dyvOX3uZjblt0ulnX1W7gfoIGHvffptUCVf4zMNHDQs20NS7JboI1IPJVoYaiXpG1Tf4pTPRWZdvI8ONulFnbD/Bu3MojGYz4vkUPmwM7C9vZRQo2R+wf1v+4/vu3PhllEoKNMip9eQZpJirOFMWABXco8=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
	s=arc-20240116; t=1751838663; c=relaxed/simple;
	bh=FTlOqTxFaAH/rnAXtLfM78PRiP1tbwPoqkCbnYXOcQ8=;
	h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References:
	 MIME-Version; b=oDLO/cWrjXNL6WbuzSZC/R03w8pFyb0N84blbk14Rm1KVHqFdZcB+qbJ0xua/xqb87gX1EH1QZmKzdP2zEEvPJbMw5VClkvgmsoqGoKdt1op+pOM+5WeTiJFDAR/Fw4UCK4g40PnEkhF5kwOfuGr1UZowxBDSWEanU1P54n0l0o=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=bwGhk9kN; arc=none smtp.client-ip=209.85.214.178
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.b="bwGhk9kN"
Received: by mail-pl1-f178.google.com with SMTP id d9443c01a7336-235ea292956so21221505ad.1
        for <git@vger.kernel.org>; Sun, 06 Jul 2025 14:51:01 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=20230601; t=1751838661; x=1752443461; darn=vger.kernel.org;
        h=content-transfer-encoding:mime-version:references:in-reply-to
         :message-id:date:subject:cc:to:from:from:to:cc:subject:date
         :message-id:reply-to;
        bh=TqSPsuofsApec5kHULRBpHlXR9K5Y9o22PySstS3aXQ=;
        b=bwGhk9kNtT1UmY0wyWcTJQSVshRoY9l2XJzHICLckdsHegwrFdET27NyFXuZQOUaeP
         nWOjz+Kr6QZISzBHb/DpsYH+luE12LdaJ1LC7Rd/AbKLHjT3AQ3hyUXF7cMGdC1D0fwu
         39mrgF+zUc8HZkxclzU/u7jLMDdjCpycWkQTD+k8BKZApUqXehraQ7CXDRcXAHx2vSiH
         u9ezAP+Eo84CQWDlOnA3bU3YVqee6HlltYP67Zu8oN0a8SkO8Q9m1EyaaSdoqiX1FvZr
         KQNtg96Z3zLqNdqWH5gZnj2ftZDJp6+L3QrXLHt4KFgh25K1wt0xhGw2T8jTSzKYrl9m
         W/wA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20230601; t=1751838661; x=1752443461;
        h=content-transfer-encoding:mime-version:references:in-reply-to
         :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc
         :subject:date:message-id:reply-to;
        bh=TqSPsuofsApec5kHULRBpHlXR9K5Y9o22PySstS3aXQ=;
        b=FJMQeM8bcaw1goDUS9+4TGGpjG+oJyWUGnvs+5l5I67M6cIgW5BcAjNnLZBKYcUx61
         K9ijxPS6qWbSewXE/U8YRYo6/SAd/c0BSyBgGV+9Y4Li5QA5eFV9smIawY2bxArnUP5I
         I89A5F2nWHIwCWFmwg+VFVytPwOmUJdG6Ci3eza+gmqFgPe5a+2xCyBAEHCJRA1Gkll6
         VFfvupYCX836hBBmEy5to9PiDyXByzTe20KkgY/HJbWmw5ihURjYELqG/R1ioaceh52O
         RzfrErHMJ9Guiizo98sIqql9T7eIqDJuEVJbRfzfKUg8ZEDQrPVnYi9YYOiFLbbagVCi
         IDaQ==
X-Forwarded-Encrypted: i=1; AJvYcCXeJJ/A1ymuwoAaql7p5aOMLHJRZbckaSZ5dYHR0nZRWnwOUUKXaK7tBr0voIYOAjas4ro=@vger.kernel.org
X-Gm-Message-State: AOJu0Yzqed/34Ulz2jLnOIBYa/sze4dEzYZqqwoYVEN+oGRXG6h5R3T+
	WEXrE2Tk/DMXVWKmjhwRafx3k68OzHRFchUZr6uIXIOmFh5q66Tq4+WU
X-Gm-Gg: ASbGncujNnQnhKBG9gglj0Vly737I6TLSaZ+9RbbDF6qBBpxSi6C3+LahveMUlTJaUd
	OF+Y724xcz0kWIkGV5bPEz2crKRB+DqqEd4hpMqDt+2VaxQ3kVDcuZQ8n33+t+vHNMhQpNWQc9I
	j75XmaKFR6RGa8/7OotO0rw/MqlnC8/nUacn4YB+Vfoa2C2Gu9L7cPR6jnxLPpwPCwMml0VC5Ga
	xKklr5nm/lvaA6fMzTeEI4LMGlSSncQgAe9tS3PrVzy145J1+MotDR+I1Cc9jNDXXl600zfHXTz
	j5JbZoxBYCMWdneKVtKxFA1gqnD/wg0bxew7nmptMTn50UU0vHsWNDAGPvSzMrPm++FVja4cHBR
	5gtge9ZIeNN0=
X-Google-Smtp-Source: AGHT+IGnXncBUQWFbpj/MetL5NnpHLHjnCSKeSWLuEEo8b75PR4Yg35JMR4DPbW6LRCFjiSNJVkTTg==
X-Received: by 2002:a17:902:ecc5:b0:234:8eeb:d834 with SMTP id d9443c01a7336-23c874761d6mr166907635ad.16.1751838660973;
        Sun, 06 Jul 2025 14:51:00 -0700 (PDT)
Received: from archlinux.plaksha.edu.in ([202.164.41.66])
        by smtp.gmail.com with ESMTPSA id d9443c01a7336-23c8457f308sm72912335ad.149.2025.07.06.14.50.58
        (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
        Sun, 06 Jul 2025 14:51:00 -0700 (PDT)
From: Usman Akinyemi <usmanakinyemi202@gmail.com>
To: usmanakinyemi202@gmail.com,
	git@vger.kernel.org
Cc: chriscool@tuxfamily.org,
	christian.couder@gmail.com,
	gitster@pobox.com,
	me@ttaylorr.com,
	ps@pks.im
Subject: [PATCH v3 5/7] t/t1517: move send-pack -h test to t1517
Date: Mon,  7 Jul 2025 03:20:37 +0530
Message-ID: <20250706215039.715732-6-usmanakinyemi202@gmail.com>
X-Mailer: git-send-email 2.50.0
In-Reply-To: <20250706215039.715732-1-usmanakinyemi202@gmail.com>
References: <20250706214108.714499-1-usmanakinyemi202@gmail.com>
 <20250706215039.715732-1-usmanakinyemi202@gmail.com>
Precedence: bulk
X-Mailing-List: git@vger.kernel.org
List-Id: <git.vger.kernel.org>
List-Subscribe: <mailto:git+subscribe@vger.kernel.org>
List-Unsubscribe: <mailto:git+unsubscribe@vger.kernel.org>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit

The test 'send-pack does not crash with -h' checks that
the command exits cleanly with usage information, both inside and
outside of a repository.

Move this test from "t/t5400-send-pack.sh" to
"t1517-outside-repo.sh" since it better fits with tests that check
command behavior outside a repository.

Suggested-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Usman Akinyemi <usmanakinyemi202@gmail.com>
---
 t/t1517-outside-repo.sh | 7 +++++++
 t/t5400-send-pack.sh    | 7 -------
 2 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/t/t1517-outside-repo.sh b/t/t1517-outside-repo.sh
index 39e7842c9e..2568f8ae0d 100755
--- a/t/t1517-outside-repo.sh
+++ b/t/t1517-outside-repo.sh
@@ -142,4 +142,11 @@ test_expect_success 'pack-refs does not crash with -h' '
 	test_grep "[Uu]sage: git pack-refs " usage
 '
 
+test_expect_success 'send-pack does not crash with -h' '
+	test_expect_code 129 git send-pack -h >usage &&
+	test_grep "[Uu]sage: git send-pack " usage &&
+	test_expect_code 129 nongit git send-pack -h >usage &&
+	test_grep "[Uu]sage: git send-pack " usage
+'
+
 test_done
diff --git a/t/t5400-send-pack.sh b/t/t5400-send-pack.sh
index 83b42ff073..571e8f1bc5 100755
--- a/t/t5400-send-pack.sh
+++ b/t/t5400-send-pack.sh
@@ -55,13 +55,6 @@ test_expect_success setup '
 	echo Rebase &&
 	git log'
 
-test_expect_success 'send-pack does not crash with -h' '
-	test_expect_code 129 git send-pack -h >usage &&
-	test_grep "[Uu]sage: git send-pack " usage &&
-	test_expect_code 129 nongit git send-pack -h >usage &&
-	test_grep "[Uu]sage: git send-pack " usage
-'
-
 test_expect_success 'pack the source repository' '
 	git repack -a -d &&
 	git prune
-- 
2.50.0


From mboxrd@z Thu Jan  1 00:00:00 1970
Received: from mail-pl1-f173.google.com (mail-pl1-f173.google.com [209.85.214.173])
	(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
	(No client certificate requested)
	by smtp.subspace.kernel.org (Postfix) with ESMTPS id D35841F4168
	for <git@vger.kernel.org>; Sun,  6 Jul 2025 21:51:04 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.173
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
	t=1751838666; cv=none; b=Hr3b93E3cZyg21qzGWJTvJmrwI2+ZrPE0eWAHZdtsdkq6scTzRAayMjjPlfxyNU7DWbVptqA3c0Th8eLu20341TdyCcprvsyXKJnuzRx8ymqvl7FYm9phGTQHddaKB89EmlAW+Ulhg+xoFPGaTArDDx/qzmxyHurQxA+A3Pfo0k=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
	s=arc-20240116; t=1751838666; c=relaxed/simple;
	bh=mo10VbJAdpSzGMuTE1bp2aBAS5AWsiEdSYoeoTjNddc=;
	h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References:
	 MIME-Version; b=bwddYgID8qOXUXZBZnKNoVeiyEB7v1T3XbzU9Tb05b7U2nkB35npNkEusWgBhxEF0x6b2lPZCIsq1vF/HsXt/J3k9sX/9musN9lV0bk65rKt5A8e/4xIWLq6K+X3p9og2cwT2F8F4B/4hvs/gjA86P5Cv6f2e5depagzQpFiBhc=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=SAQssubs; arc=none smtp.client-ip=209.85.214.173
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.b="SAQssubs"
Received: by mail-pl1-f173.google.com with SMTP id d9443c01a7336-234b9dfb842so20876435ad.1
        for <git@vger.kernel.org>; Sun, 06 Jul 2025 14:51:04 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=20230601; t=1751838664; x=1752443464; darn=vger.kernel.org;
        h=content-transfer-encoding:mime-version:references:in-reply-to
         :message-id:date:subject:cc:to:from:from:to:cc:subject:date
         :message-id:reply-to;
        bh=x2tJb25DIueXTwiI6a2j0IYObpDxqxw5f1lkzKE5Rqk=;
        b=SAQssubsEq0bi6GRJ59uewJL/0GMZOGKKjl0XnYZli0x1M0q//LD2rhIfEEGnf9lDi
         Yjon5IISvWeyUQ13SzCU08JobWvwgvQstBNgXpJ8v81gzG++DKP7OFsF7I+f1cxB0zG2
         qyKj7C0MrzigGwZGBwO1uJDp6yfZddS63modg+5Of19JvZtE6SI9hu8715SIN88+TVcU
         t2lM0eYP6JsXzzFuGx7nnuCnnIechQA0PiEEVhbnas9x6z5ys6GLYMWGgr+l104ld/Gf
         ZtLvreH/ElFl2NKBM1+ZDQumxX6IbpjpfqGpZJz+Yjzy1kzXSjTxVECh9KdK7QTGqHCK
         KkMw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20230601; t=1751838664; x=1752443464;
        h=content-transfer-encoding:mime-version:references:in-reply-to
         :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc
         :subject:date:message-id:reply-to;
        bh=x2tJb25DIueXTwiI6a2j0IYObpDxqxw5f1lkzKE5Rqk=;
        b=WIxYWMly/wnH9eE3ufgCK/95Soiq443RQbIqzuP3bQPJrpvBADXFTXRAyjogk/BiWA
         gP0SDeNnfsC2+MfTtiHC1qFvFb1qgcciNDHnlZr6KLAebVxyfhvDrgAVPaMzgQFB+dYq
         KaumV7Ug5rJTKnJljB8b1jjJ5ibmJo4oFKvg6I7s7oT1/7WJjPLtQM2KJfsQIPf10vBx
         IL8h8v1rzP4IycJyxKzAm+HSSNmyXn0zlDbp8zhHYnuNiZ7971IlIUPZNZWp7z4py+ax
         E7v9klT/zWIaxhYyUlfMtxAyEz7NYWwK/gsycy43jskVSdJcWrRns9ougxkr3yDT1gy5
         42Hw==
X-Forwarded-Encrypted: i=1; AJvYcCWbY0UsDC/gUU8namh2tBdtKPI3KauSHMc/2MiD3/F3iX2//co/ydw+dxigEbn1EsVjHMc=@vger.kernel.org
X-Gm-Message-State: AOJu0YwmClwWSjwXVAIl0pkg01GlMr7S9EOTiCD1S7OiufyLbQCbaRHU
	50tom3KNhvT+SpVB5P7w8DugC97ZMjY1cM4KwPJxVVrH9AXBuGlg/EG2
X-Gm-Gg: ASbGncvf+4prc1ewf9aYpeTBEDCkHvbqTl/5vND6JXHxXSZIUk9tdUuv/v8s391WeY/
	gwvECSnmKmSYV3fWxi+KIkLfcnqA0Ua0xLE5g/a3hJ9SEIGj/Q3ms7HARpwTPiy3LLRmvkKVJKT
	Qz9+xwYyN4aOEUfBQnBNtukwudE4jjpnayhj1ADba7dJIfMwGuQYn8v/k3fP7X3VH0+A5Fdt0h4
	I3vyeEl5KktzicpqrtR6GjmFmm3/w0F7zYOkVk1FUn+BUIn+wF1fcorPpOkh4hX5ZEg6EYExY7+
	YEynAVFFyLjfxBOCfVhyPztKd30kVRF+5e605Vb2TN5yDryA+SddBechl1rIEmxcdl0B1aZCdeW
	RPEDhsEWOYK8=
X-Google-Smtp-Source: AGHT+IEEMhac9q7XAYVah6Foatqoza+Xr5BIY6HbZ87aYD5CSWYSt9Kxu3wqooBVQjRnXsNeAqRtHQ==
X-Received: by 2002:a17:902:f609:b0:234:98eb:8eda with SMTP id d9443c01a7336-23c8755bdeemr165530715ad.28.1751838664151;
        Sun, 06 Jul 2025 14:51:04 -0700 (PDT)
Received: from archlinux.plaksha.edu.in ([202.164.41.66])
        by smtp.gmail.com with ESMTPSA id d9443c01a7336-23c8457f308sm72912335ad.149.2025.07.06.14.51.01
        (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
        Sun, 06 Jul 2025 14:51:03 -0700 (PDT)
From: Usman Akinyemi <usmanakinyemi202@gmail.com>
To: usmanakinyemi202@gmail.com,
	git@vger.kernel.org
Cc: chriscool@tuxfamily.org,
	christian.couder@gmail.com,
	gitster@pobox.com,
	me@ttaylorr.com,
	ps@pks.im
Subject: [PATCH v3 6/7] t/t1517: move verify-commit -h test to t1517
Date: Mon,  7 Jul 2025 03:20:38 +0530
Message-ID: <20250706215039.715732-7-usmanakinyemi202@gmail.com>
X-Mailer: git-send-email 2.50.0
In-Reply-To: <20250706215039.715732-1-usmanakinyemi202@gmail.com>
References: <20250706214108.714499-1-usmanakinyemi202@gmail.com>
 <20250706215039.715732-1-usmanakinyemi202@gmail.com>
Precedence: bulk
X-Mailing-List: git@vger.kernel.org
List-Id: <git.vger.kernel.org>
List-Subscribe: <mailto:git+subscribe@vger.kernel.org>
List-Unsubscribe: <mailto:git+unsubscribe@vger.kernel.org>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit

The test 'verify-commit does not crash with -h' checks that
the command exits cleanly with usage information, both inside and
outside of a repository.

Move this test from "t/t7510-signed-commit.sh" to
"t1517-outside-repo.sh" since it better fits with tests that check
command behavior outside a repository.

Suggested-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Usman Akinyemi <usmanakinyemi202@gmail.com>
---
 t/t1517-outside-repo.sh  | 7 +++++++
 t/t7510-signed-commit.sh | 7 -------
 2 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/t/t1517-outside-repo.sh b/t/t1517-outside-repo.sh
index 2568f8ae0d..8a46fdfdd1 100755
--- a/t/t1517-outside-repo.sh
+++ b/t/t1517-outside-repo.sh
@@ -149,4 +149,11 @@ test_expect_success 'send-pack does not crash with -h' '
 	test_grep "[Uu]sage: git send-pack " usage
 '
 
+test_expect_success 'verify-commit does not crash with -h' '
+	test_expect_code 129 git verify-commit -h >usage &&
+	test_grep "[Uu]sage: git verify-commit " usage &&
+	test_expect_code 129 nongit git verify-commit -h >usage &&
+	test_grep "[Uu]sage: git verify-commit " usage
+'
+
 test_done
diff --git a/t/t7510-signed-commit.sh b/t/t7510-signed-commit.sh
index 39677e859a..0d2dd29fe6 100755
--- a/t/t7510-signed-commit.sh
+++ b/t/t7510-signed-commit.sh
@@ -8,13 +8,6 @@ export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
 GNUPGHOME_NOT_USED=$GNUPGHOME
 . "$TEST_DIRECTORY/lib-gpg.sh"
 
-test_expect_success GPG 'verify-commit does not crash with -h' '
-	test_expect_code 129 git verify-commit -h >usage &&
-	test_grep "[Uu]sage: git verify-commit " usage &&
-	test_expect_code 129 nongit git verify-commit -h >usage &&
-	test_grep "[Uu]sage: git verify-commit " usage
-'
-
 test_expect_success GPG 'create signed commits' '
 	test_oid_cache <<-\EOF &&
 	header sha1:gpgsig
-- 
2.50.0


From mboxrd@z Thu Jan  1 00:00:00 1970
Received: from mail-pl1-f171.google.com (mail-pl1-f171.google.com [209.85.214.171])
	(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
	(No client certificate requested)
	by smtp.subspace.kernel.org (Postfix) with ESMTPS id 0E9E21F4168
	for <git@vger.kernel.org>; Sun,  6 Jul 2025 21:51:07 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.171
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
	t=1751838669; cv=none; b=KslrFcethaSLO+r8ACWkpqQd6hQAwS3rSYdev+VfTfLw5P2m7at2wURvLzpJfptcUyUFgq6bcEbM6unu2Gs4fMaTDFa1SJwGLaOAQfk1uVSDqmTH7rBGvAsdGpV0jEzmpUyfVyBn8wWb2vBMo7PGs5+fWXc+h6zEsb4N9PbZoKQ=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
	s=arc-20240116; t=1751838669; c=relaxed/simple;
	bh=h29B3v6VCSTIDhtlUk9oxVjrP3KSFMtttpj7Lm/4iL4=;
	h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References:
	 MIME-Version; b=l7l+JPg5m6NIIWOUQodpV6+Ix4JEzXKHysmqj44pWDWLGWB0Ea+/CClCjgSBnF9i6r9VCJgqTM2hEuYJitnY1lCMUFg4Qrh/PhHtYAPiSiBh/pZMwz+D4ZTh/1Uon1Uj8HKT2ygSDUqZ09nx2aC0tszkeJMZJxFuYS/+EtPwOyc=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=KS+oXncC; arc=none smtp.client-ip=209.85.214.171
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.b="KS+oXncC"
Received: by mail-pl1-f171.google.com with SMTP id d9443c01a7336-236377f00easo31240165ad.1
        for <git@vger.kernel.org>; Sun, 06 Jul 2025 14:51:07 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=20230601; t=1751838667; x=1752443467; darn=vger.kernel.org;
        h=content-transfer-encoding:mime-version:references:in-reply-to
         :message-id:date:subject:cc:to:from:from:to:cc:subject:date
         :message-id:reply-to;
        bh=wdMduXr/TgsaR6JzOkiGxwzzgi4xM3rjP/fjiJsVEhI=;
        b=KS+oXncCT87jBcPDhAh6IgYIe3I23RbA306lCgXsMqgYZb0wjyDIN4wuFDfCoR0jPG
         GJOaSE9B4SRlIGUynKZZ8IZ4ErT5bQYf6/hkMx9/V04bFe6WDV787oqR8KSEZibs9kjG
         CPlwWrW+8wd0PVPOBSi/WW2O/4s5H3Er6llIaWOQUMPEdPUruMz4oTmqoEfLbw2LyaWk
         VvgmgHHfur0xCz17P380P4GUr6X0b+CTNF5PCTANSx3OaANWFqWTjJ72wOpTBskwVlvR
         WluRzjxyCLZp7XV+YvufvjwWgIMVjUd9YOLxPQ02VAg+T6x11HV4JqaASCsP/nvOROCa
         WAAg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20230601; t=1751838667; x=1752443467;
        h=content-transfer-encoding:mime-version:references:in-reply-to
         :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc
         :subject:date:message-id:reply-to;
        bh=wdMduXr/TgsaR6JzOkiGxwzzgi4xM3rjP/fjiJsVEhI=;
        b=u+C6Ulmi5dDV2TSykD/g0GHc4Mo+YBAup/QJx/X6JlVWSLDyvjkEb8T5WZjtUqCCks
         Yi8VKwbZQ3KIgNgtdfuviWL7BHTRmluxP12yhpPPecqWOf89WzQ1SCBwkIlw9Q5OlOv/
         sp7fSagwjHqP51uRwktxiLTC7AvRdj6fEPKiD2bOP1G2S00hs61Pb6o5WrxIWthQbzLH
         mToezEoooDAUPvvqcqkKSPxIZjw2sHcZXkauo2DB9h52vcKzeIjzUmUXrxYw+4Y7EI5R
         QndhY7fV46UIBJJY/iJhmj5B6+BI7DNl/KQhmAQKOgXCtFN555rdMDM9NXmCXZQDNsgl
         5ZMA==
X-Forwarded-Encrypted: i=1; AJvYcCWX1UDFoFEuFrGE9g/YmYP01uRRdDHDM67qrM379FRhUEqxC1xPIzJA0BSeSmsb+KgYVCs=@vger.kernel.org
X-Gm-Message-State: AOJu0Yy+324FT/XkSFqfFpxaHNfTRkFX+HledNw/e7EUFylMKr2BW3Qo
	A6PXP6BJCofaTXxB8Ff8xGQP1yPpI39c/4rRVNZnrOES2Ye3AxRQRyTY
X-Gm-Gg: ASbGnctG0OI/DpxWHx8aKGLuthSjOzHgIjQ2hrhaIu99mKqwA4We2ZFvMi9OKy4V429
	q6qMcyVpn11hRn7kLWY5rGE29zVqrqpEyrzuKu8ztxiwN6S7yWtgQ+/buuyOVgMKuC0V9u7rvRE
	E62VyylrXJ0R6SXdwAIay4MgNvDXic8p+9cwZ3mdT+3XA22LqZVn9ae6ItCqYfvdAIRYl/EpIwv
	bHcvwMZVY2Xci8McBcRoIS9MzpAfTJgnqof52dJxClNAzo+I4NgztZLtywPIhplmROixUpEoSLd
	/CsFMuyIr7+5Hj3xRRaNxe030uCU/BIcE/11WHFgm/2GcilTmQnnUXBsIugvif51hv235HV4XUo
	tVN6AO0mAlqM=
X-Google-Smtp-Source: AGHT+IE0SIjFKTc8UKaw2VdGLBeTgEV65dC+XiIE6chgdq9gq3ShTLuDhAWWtpgVc0HC+6kxJbjwsw==
X-Received: by 2002:a17:903:28c4:b0:236:6f5f:caa9 with SMTP id d9443c01a7336-23c85e7735dmr92287865ad.32.1751838667359;
        Sun, 06 Jul 2025 14:51:07 -0700 (PDT)
Received: from archlinux.plaksha.edu.in ([202.164.41.66])
        by smtp.gmail.com with ESMTPSA id d9443c01a7336-23c8457f308sm72912335ad.149.2025.07.06.14.51.04
        (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
        Sun, 06 Jul 2025 14:51:07 -0700 (PDT)
From: Usman Akinyemi <usmanakinyemi202@gmail.com>
To: usmanakinyemi202@gmail.com,
	git@vger.kernel.org
Cc: chriscool@tuxfamily.org,
	christian.couder@gmail.com,
	gitster@pobox.com,
	me@ttaylorr.com,
	ps@pks.im
Subject: [PATCH v3 7/7] t/t1517: move verify-tag -h test to t1517
Date: Mon,  7 Jul 2025 03:20:39 +0530
Message-ID: <20250706215039.715732-8-usmanakinyemi202@gmail.com>
X-Mailer: git-send-email 2.50.0
In-Reply-To: <20250706215039.715732-1-usmanakinyemi202@gmail.com>
References: <20250706214108.714499-1-usmanakinyemi202@gmail.com>
 <20250706215039.715732-1-usmanakinyemi202@gmail.com>
Precedence: bulk
X-Mailing-List: git@vger.kernel.org
List-Id: <git.vger.kernel.org>
List-Subscribe: <mailto:git+subscribe@vger.kernel.org>
List-Unsubscribe: <mailto:git+unsubscribe@vger.kernel.org>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit

The test 'verify-tag does not crash with -h' checks that
the command exits cleanly with usage information, both inside and
outside of a repository.

Move this test from "t/t7030-verify-tag.sh" to
"t1517-outside-repo.sh" since it better fits with tests that check
command behavior outside a repository.

Suggested-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Usman Akinyemi <usmanakinyemi202@gmail.com>
---
 t/t1517-outside-repo.sh | 7 +++++++
 t/t7030-verify-tag.sh   | 7 -------
 2 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/t/t1517-outside-repo.sh b/t/t1517-outside-repo.sh
index 8a46fdfdd1..25ec3b3978 100755
--- a/t/t1517-outside-repo.sh
+++ b/t/t1517-outside-repo.sh
@@ -156,4 +156,11 @@ test_expect_success 'verify-commit does not crash with -h' '
 	test_grep "[Uu]sage: git verify-commit " usage
 '
 
+test_expect_success 'verify-tag does not crash with -h' '
+	test_expect_code 129 git verify-tag -h >usage &&
+	test_grep "[Uu]sage: git verify-tag " usage &&
+	test_expect_code 129 nongit git verify-tag -h >usage &&
+	test_grep "[Uu]sage: git verify-tag " usage
+'
+
 test_done
diff --git a/t/t7030-verify-tag.sh b/t/t7030-verify-tag.sh
index 2c147072c1..6f526c37c2 100755
--- a/t/t7030-verify-tag.sh
+++ b/t/t7030-verify-tag.sh
@@ -7,13 +7,6 @@ export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
 . ./test-lib.sh
 . "$TEST_DIRECTORY/lib-gpg.sh"
 
-test_expect_success GPG 'verify-tag does not crash with -h' '
-	test_expect_code 129 git verify-tag -h >usage &&
-	test_grep "[Uu]sage: git verify-tag " usage &&
-	test_expect_code 129 nongit git verify-tag -h >usage &&
-	test_grep "[Uu]sage: git verify-tag " usage
-'
-
 test_expect_success GPG 'create signed tags' '
 	echo 1 >file && git add file &&
 	test_tick && git commit -m initial &&
-- 
2.50.0


From mboxrd@z Thu Jan  1 00:00:00 1970
Received: from fhigh-b5-smtp.messagingengine.com (fhigh-b5-smtp.messagingengine.com [202.12.124.156])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(No client certificate requested)
	by smtp.subspace.kernel.org (Postfix) with ESMTPS id F21A118D65C
	for <git@vger.kernel.org>; Mon,  7 Jul 2025 16:12:04 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=202.12.124.156
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
	t=1751904727; cv=none; b=h5WrXTqm3mJqSJhYd4EJGLVyD2+VcvgBMGVCLQ3aRvq02L3+pjZuzaD/v5WfA57VTij8IU0GOEB1atXEKlIhuduXGBOnJexFJVpZ6Jqdriwvu6nfsMzDs8UW96sq+vNbf6686PQ1L+mnvCgjMASDEHjZrgbbUz2iArFgO3ZmvOY=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
	s=arc-20240116; t=1751904727; c=relaxed/simple;
	bh=l3M9soTuVTdN/Edc2sk49AhQDsouuaeRAse/wE+8yCs=;
	h=From:To:Cc:Subject:In-Reply-To:References:Date:Message-ID:
	 MIME-Version:Content-Type; b=C0mdS8XTkQdjwu2f+B4UsLYzotCB3RAulMHtQmyZeph9ww+OodwjCVx7CMnnUwPtsS31rQn1RxMWINs5HZBzQyLijZRtGesVlV7MJ/QKOjpqxJOTYN1Uth9NY6kKGXa3LzWrHjaFB8TBhAratZ6wWdJwcFC3/fdzJxK/6p41xYQ=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=pobox.com; spf=pass smtp.mailfrom=pobox.com; dkim=pass (2048-bit key) header.d=pobox.com header.i=@pobox.com header.b=UAE9v0Wm; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b=juMMqdyy; arc=none smtp.client-ip=202.12.124.156
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=pobox.com
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=pobox.com
Authentication-Results: smtp.subspace.kernel.org;
	dkim=pass (2048-bit key) header.d=pobox.com header.i=@pobox.com header.b="UAE9v0Wm";
	dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="juMMqdyy"
Received: from phl-compute-05.internal (phl-compute-05.phl.internal [10.202.2.45])
	by mailfhigh.stl.internal (Postfix) with ESMTP id D29BC7A0225;
	Mon,  7 Jul 2025 12:12:03 -0400 (EDT)
Received: from phl-frontend-02 ([10.202.2.161])
  by phl-compute-05.internal (MEProxy); Mon, 07 Jul 2025 12:12:04 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pobox.com; h=cc
	:cc:content-type:content-type:date:date:from:from:in-reply-to
	:in-reply-to:message-id:mime-version:references:reply-to:subject
	:subject:to:to; s=fm1; t=1751904723; x=1751991123; bh=yZDbIGFZoM
	BJVqVFk5DYC/IeV9sDLz84iXoslTjwGaw=; b=UAE9v0WmDRyKmHJYR2Q7MHnCmr
	rRaPuByCYX3JoiYI5c/DJauhn/fgJt6BGneTwnfF44CuEzBCKkaEuxCyR75lwRki
	1EL6fpuTzU4or/KfSuwqRR1R8qZ6gSao9uO6Gb6w75k3B86g7VnJIDqu1+QYMrIJ
	FSulpPB6LYAcA9gNMeTC1LsS0OU5MhMFL8VUWCKZMSIj3aHU4L7XOrk8axIsUgqB
	pikP3WxNREQSXu8sAcowbCHMn+OmWFA8/KtQDgxrWF2tgkNQ8eVqdYHcDq2yViJc
	bZhQZfcFoNsMF2uNp/eHS8Ijb4AWx6wECtjqguxc2xWDnEZdUcouDjo75f8g==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=
	messagingengine.com; h=cc:cc:content-type:content-type:date:date
	:feedback-id:feedback-id:from:from:in-reply-to:in-reply-to
	:message-id:mime-version:references:reply-to:subject:subject:to
	:to:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm2; t=
	1751904723; x=1751991123; bh=yZDbIGFZoMBJVqVFk5DYC/IeV9sDLz84iXo
	slTjwGaw=; b=juMMqdyyH07BibtXPeb2tV1RFkdee5uCu7NinMaUXQN8T0o7KL6
	CHrakLXbFfGECI8Xfiao/zrXtcXZITM6eX1cN+M+OC0Td2u65eR3MYWI6V1r/eS3
	3/bfhIWZyaduPnGyxDQdZYH1g8yZP+R2J/4E2vReMyImskbljr3PsS7xD1ExL9WO
	h0OW189b5joAvhRM8NpnLIZObJuPvC2XSU81lYjK53vbiMcI5a9/utnorVd8w8zh
	uXLSVipKKnsTtILt2QpzwLTofd6wD7Bo10zWsW1czgspl4owXRzU+Ufg2NAGRIdm
	fiU+qSnuncUD5Cc8H3XqbKXPOEk7mLyg8ww==
X-ME-Sender: <xms:0_FraAW215zYtiD_IIoxysk5bCTJ-CEgS0MI0Vte-4Jsc2RNuT6rrA>
    <xme:0_FraCLaQKPhQstsk_A4A3G4saFsEhA9fkvzpYjNWx_HXs7o7hGVS25qzI4tlYfoE
    hNekmlwEHrILuqHKA>
X-ME-Received: <xmr:0_FraK3anugNfjP3z-2AnwxzZqxY5-BggsakDNtuPL5UOJyvTAAkOhakxSdktHpJIeEEHG_q-PhNGaAidgKvIdwHpSroeKAVR-5Scv8>
X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeffedrtdefgdefvddvgecutefuodetggdotefrod
    ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpuffrtefokffrpgfnqfghnecuuegr
    ihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjug
    hrpefhvfevufgjfhffkfgfgggtsehttdertddtredtnecuhfhrohhmpefluhhnihhoucev
    ucfjrghmrghnohcuoehgihhtshhtvghrsehpohgsohigrdgtohhmqeenucggtffrrghtth
    gvrhhnpeefveetteejheeugeffledvteeiveffueefjeelueffteeigffgfedthfefieeg
    ieenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehgih
    htshhtvghrsehpohgsohigrdgtohhmpdhnsggprhgtphhtthhopeejpdhmohguvgepshhm
    thhpohhuthdprhgtphhtthhopehushhmrghnrghkihhnhigvmhhivddtvdesghhmrghilh
    drtghomhdprhgtphhtthhopehgihhtsehvghgvrhdrkhgvrhhnvghlrdhorhhgpdhrtghp
    thhtoheptghhrhhishgtohholhesthhugihfrghmihhlhidrohhrghdprhgtphhtthhope
    gthhhrihhsthhirghnrdgtohhuuggvrhesghhmrghilhdrtghomhdprhgtphhtthhopehm
    vgesthhtrgihlhhorhhrrdgtohhmpdhrtghpthhtohepphhssehpkhhsrdhimhdprhgtph
    htthhopehgihhtshhtvghrsehpohgsohigrdgtohhm
X-ME-Proxy: <xmx:0_FraA5eS6ksKBfzrfRePqy6kHeXL8evyQN4zOn7xOxkHKhRgOAHCA>
    <xmx:0_FraL__zPYfqCypSWMyRplC2o5g18CuewHspvw2cBF2vErIjJJ9PQ>
    <xmx:0_FraPXZ_ByPyx4m5kARU_IiaB8H7Pus481Ucz50At6hVHUNrlb6Lg>
    <xmx:0_FraGrmv3XLHKZ3ExqQuMPyjIsO38nsBz8gpZJaScgL7vstMwCAZA>
    <xmx:0_FraH7amtsizdFqaOxnk2hhzDFYuTeItzBN4shZoQ4tVcG0PDv2Zhpd>
Feedback-ID: if26b431b:Fastmail
Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon,
 7 Jul 2025 12:12:02 -0400 (EDT)
From: Junio C Hamano <gitster@pobox.com>
To: Usman Akinyemi <usmanakinyemi202@gmail.com>
Cc: git@vger.kernel.org,  chriscool@tuxfamily.org,
  christian.couder@gmail.com,  me@ttaylorr.com,  ps@pks.im
Subject: Re: [PATCH v3 6/7] t/t1517: move verify-commit -h test to t1517
In-Reply-To: <20250706215039.715732-7-usmanakinyemi202@gmail.com> (Usman
	Akinyemi's message of "Mon, 7 Jul 2025 03:20:38 +0530")
References: <20250706214108.714499-1-usmanakinyemi202@gmail.com>
	<20250706215039.715732-1-usmanakinyemi202@gmail.com>
	<20250706215039.715732-7-usmanakinyemi202@gmail.com>
Date: Mon, 07 Jul 2025 09:12:01 -0700
Message-ID: <xmqqtt3o3rqm.fsf@gitster.g>
User-Agent: Gnus/5.13 (Gnus v5.13)
Precedence: bulk
X-Mailing-List: git@vger.kernel.org
List-Id: <git.vger.kernel.org>
List-Subscribe: <mailto:git+subscribe@vger.kernel.org>
List-Unsubscribe: <mailto:git+unsubscribe@vger.kernel.org>
MIME-Version: 1.0
Content-Type: text/plain

Usman Akinyemi <usmanakinyemi202@gmail.com> writes:

> The test 'verify-commit does not crash with -h' checks that
> the command exits cleanly with usage information, both inside and
> outside of a repository.
>
> Move this test from "t/t7510-signed-commit.sh" to
> "t1517-outside-repo.sh" since it better fits with tests that check
> command behavior outside a repository.
>
> Suggested-by: Patrick Steinhardt <ps@pks.im>
> Signed-off-by: Usman Akinyemi <usmanakinyemi202@gmail.com>
> ---
>  t/t1517-outside-repo.sh  | 7 +++++++
>  t/t7510-signed-commit.sh | 7 -------
>  2 files changed, 7 insertions(+), 7 deletions(-)

My first reaction to this series was "heh, you can cut it both ways;
a test to see how a command A works outside a repository can be a
test about command A (which is the way how the current test suite
looks at) or a test about being outside a repository (which this
topic tries to move into).

But this may be an example that shows why it is more error prone to
partition across "inside? outside?" axis.  These particular ones may
be limited to "should exit without crashing and without doing
anything fancy when asked to give a short help", so this move may
happen to be able to lose the GPG prerequisite without breaking
anything.

But in the longer run, we are very much likely that we'd want to
test something that needs things that require prerequisites (like
"do this only where XYZ is installed") but ought to work outside a
repository, which means t1517 would need to pull in things like
lib-gpg.sh only because it has a few tests about verify-blah
command.  These tend to accumulate over time.

So, I dunno.


From mboxrd@z Thu Jan  1 00:00:00 1970
Received: from mail-vk1-f179.google.com (mail-vk1-f179.google.com [209.85.221.179])
	(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
	(No client certificate requested)
	by smtp.subspace.kernel.org (Postfix) with ESMTPS id 10173202F7B
	for <git@vger.kernel.org>; Thu, 10 Jul 2025 22:59:42 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.179
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
	t=1752188384; cv=none; b=QIaIKVI/esbDy9VMcljQF5GMjG7SW8YOcYgfjp4l00zAUbXCE8Sk+pIcYo9uOXQYDdpZ+1w2NoL8yOkMp+cfE3edX59xa+XMTbYbgUpBC3Gud2GtkXg8VJdgsyRzqcxTKdxn34I9IigNBm/JppU0msAUPfRRoAZKx+xvf/kQrjU=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
	s=arc-20240116; t=1752188384; c=relaxed/simple;
	bh=gF7M6Kv5JAFQy/tuXQ8U/4sl4wMNB9COo/vUxCtTgrw=;
	h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject:
	 To:Cc:Content-Type; b=aaliFS4W3gbv9qOx0xPYMS2i57lAnnZ4pXGc6N/3Ks9DeScvE9HuvTuS1TEXyz/7BUo5JM+zBo5EzYIy/VMdnA/ctLN+2WMM6s5y62jMKWWswNPNrni+XDfiYKt95WTA0QTWHawxEFiHuDXZz2cpbl3UtHhFwY91nBgrhNOfLwo=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=CYRUZ8TW; arc=none smtp.client-ip=209.85.221.179
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.b="CYRUZ8TW"
Received: by mail-vk1-f179.google.com with SMTP id 71dfb90a1353d-5290be1aedcso2173980e0c.1
        for <git@vger.kernel.org>; Thu, 10 Jul 2025 15:59:42 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=20230601; t=1752188382; x=1752793182; darn=vger.kernel.org;
        h=content-transfer-encoding:cc:to:subject:message-id:date:from
         :in-reply-to:references:mime-version:from:to:cc:subject:date
         :message-id:reply-to;
        bh=Zh5XeJgv4o/hEVRxXDohlawb7Ri3Vksod2LCE3drVfE=;
        b=CYRUZ8TWmJEuLbX7xFkWGtUHLl/zMwGSKEH4T0v4XSk6Hz5JlrKRDZyXUqizJenjII
         4TL08A8ESDXy+lNEmHicbHXvbZcaUjWqInlj/1P+7UqoUF5vM4nkIerPjDpfYgpJZerl
         DKWyWXP1hLZyltz7HLJevXtRpvdCVl80UxHn4Ix9Bvoafnzq5BNBpaNrEDOO6rXpAgUP
         EzBS77F8xuP8BKaakO9ofUf7s9u/BHtuZ4YD9EwlkZerahS+NgIIBMUBGw45sdQTPAvn
         Cr1e1T4o4spmNHxSfQ5KnsmMwSxvZ34YRvBp/asAd0/oEV+O/veYwsDNZrius1oHiiOF
         rNmg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20230601; t=1752188382; x=1752793182;
        h=content-transfer-encoding:cc:to:subject:message-id:date:from
         :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc
         :subject:date:message-id:reply-to;
        bh=Zh5XeJgv4o/hEVRxXDohlawb7Ri3Vksod2LCE3drVfE=;
        b=vEiiew24eff1ta3iUPBfNfDFd1sVjZ7k3DiRMfZ2USW+KtMD5ChvpiIQvoxOrMEZ3E
         yfueGBMhQBh+KXCwKgXytP64lkbodxaOsq9kiYMaJa1Ytlm4ht72h01VvMhB4yDCAUH5
         G62QjVEhc8eBVcaHvvTbzGg3DA/6t9/87cShWSsqVbP0mXTVkPzQ+xfs6Pxn0bHExy/G
         WTNuCFlYuXlNp/bGlup5Ba0cNq4fZoCWX5AiwmntZULU0F78V0WaJ/lh0M6d0J6eXAqH
         haNENrYGbgR5ey92TmZpoelLAb64qB6CBcaCI4cvHEe6HWfk7aGk61XurOTQiKZ8mL+W
         CiCA==
X-Gm-Message-State: AOJu0Ywya32WegEpN+8+IfNsjRNHdnLyaJG15G1+ja6tLVMkKoUFyL0O
	PJ10BLwpga+PHdTluiOLekWt62K4RyGnD6Mh2RDoODsd5WygWKNLsOo5+14oJUvR/nhtrSno73V
	TRKmRVAbtjFZipJ6dPOzVzH9jy7iX+UU=
X-Gm-Gg: ASbGnctP/hPFxugAK/P8GMEkIR//nVOMCW9Ls5nm0Tfh3hqgE9++d3eHOYYor9ktRWE
	kggZ1hmt+WQ999Jlc97tYt1Sqt1L/r8dXTFi9E63Ih3ugXnuf0pOWwNMEScPCFW/tbFLstD0Vbb
	ytJdA4+TlDKDG94NfAEok7KeVI3VZ8a57E7VxDHfy+Xms=
X-Google-Smtp-Source: AGHT+IGXtsQhk4/gYojBwCohXtigHm4ZSjyH4op0JY8oxEVeSbwEOQCbfq0tfjNxfl7X80cwJod6tpwt0hbnPzAWM3g=
X-Received: by 2002:a05:6122:659e:b0:535:ed79:2aed with SMTP id
 71dfb90a1353d-535f360cafbmr1310140e0c.2.1752188381786; Thu, 10 Jul 2025
 15:59:41 -0700 (PDT)
Precedence: bulk
X-Mailing-List: git@vger.kernel.org
List-Id: <git.vger.kernel.org>
List-Subscribe: <mailto:git+subscribe@vger.kernel.org>
List-Unsubscribe: <mailto:git+unsubscribe@vger.kernel.org>
MIME-Version: 1.0
References: <20250706214108.714499-1-usmanakinyemi202@gmail.com>
 <20250706215039.715732-1-usmanakinyemi202@gmail.com> <20250706215039.715732-7-usmanakinyemi202@gmail.com>
 <xmqqtt3o3rqm.fsf@gitster.g>
In-Reply-To: <xmqqtt3o3rqm.fsf@gitster.g>
From: Usman Akinyemi <usmanakinyemi202@gmail.com>
Date: Fri, 11 Jul 2025 04:29:30 +0530
X-Gm-Features: Ac12FXzEKVvfnt3kQ_ZQK0kCtUSUk_qpn5Hs9iad1Te0KfrRuni1CXugl4F_66U
Message-ID: <CAPSxiM_ZZrbFpgvxqYgZ8oeTbRs+HW=rM+9Dud0G_Qr7eq3=FA@mail.gmail.com>
Subject: Re: [PATCH v3 6/7] t/t1517: move verify-commit -h test to t1517
To: Junio C Hamano <gitster@pobox.com>
Cc: git@vger.kernel.org, chriscool@tuxfamily.org, christian.couder@gmail.com, 
	me@ttaylorr.com, ps@pks.im
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

On Mon, Jul 7, 2025 at 9:42=E2=80=AFPM Junio C Hamano <gitster@pobox.com> w=
rote:
>
> Usman Akinyemi <usmanakinyemi202@gmail.com> writes:
>
> > The test 'verify-commit does not crash with -h' checks that
> > the command exits cleanly with usage information, both inside and
> > outside of a repository.
> >
> > Move this test from "t/t7510-signed-commit.sh" to
> > "t1517-outside-repo.sh" since it better fits with tests that check
> > command behavior outside a repository.
> >
> > Suggested-by: Patrick Steinhardt <ps@pks.im>
> > Signed-off-by: Usman Akinyemi <usmanakinyemi202@gmail.com>
> > ---
> >  t/t1517-outside-repo.sh  | 7 +++++++
> >  t/t7510-signed-commit.sh | 7 -------
> >  2 files changed, 7 insertions(+), 7 deletions(-)
>
Hi Junio,
> My first reaction to this series was "heh, you can cut it both ways;
> a test to see how a command A works outside a repository can be a
> test about command A (which is the way how the current test suite
> looks at) or a test about being outside a repository (which this
> topic tries to move into).
>
Actually, I felt the same while trying to create the patch series. I was
going to just send a single patch before as an RFC.

> But this may be an example that shows why it is more error prone to
> partition across "inside? outside?" axis.  These particular ones may
> be limited to "should exit without crashing and without doing
> anything fancy when asked to give a short help", so this move may
> happen to be able to lose the GPG prerequisite without breaking
> anything.
>
> But in the longer run, we are very much likely that we'd want to
> test something that needs things that require prerequisites (like
> "do this only where XYZ is installed") but ought to work outside a
> repository, which means t1517 would need to pull in things like
> lib-gpg.sh only because it has a few tests about verify-blah
> command.  These tend to accumulate over time.

I understand the concern and I felt we should at least decide where to
put the "verify -h" because, right now, we have some of them in the
t1517 and also some in their respective test files. So, there are some
little hiccups there. It will also create a headache for someone who is try=
ing
to place the test(deciding if they should put it in the t1517 as some
test or inside
their respective test as some others). Also, Ayush(GSoC) is also
working currently around this
part.

Is it something that is worth creating a new test file for, I will
probably say that is a viable solution or better still we should put
the test inside their respective test files.

What do you think ?
>
> So, I dunno.
>

From mboxrd@z Thu Jan  1 00:00:00 1970
Received: from fout-a8-smtp.messagingengine.com (fout-a8-smtp.messagingengine.com [103.168.172.151])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(No client certificate requested)
	by smtp.subspace.kernel.org (Postfix) with ESMTPS id 58B3E24886C
	for <git@vger.kernel.org>; Fri, 11 Jul 2025 16:37:13 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=103.168.172.151
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
	t=1752251835; cv=none; b=WyAehVHoL+2Vv+hdvlpjI6Hgn2uG52aif4Q5O8YwtYIxFs7gIhDvv8B6kIb3C77llmjqyZV3pWBFUDci3ogyMoQ15m0FogyFXXPvqc993seaxiiGx0oUNRw/rqW8GUVoJ+yrVRDZsuMwXUi4bp2hvA2AZPcVnKrhnADofOu27dQ=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
	s=arc-20240116; t=1752251835; c=relaxed/simple;
	bh=x0ylt7vssmQG606Xp6AOkujE5s8abWdyPizg8ttEqoE=;
	h=From:To:Cc:Subject:In-Reply-To:References:Date:Message-ID:
	 MIME-Version:Content-Type; b=NtpS/gf8JRuYOwo9NHLWaM/ygv+DMSDvit8UIlwaa+9PSQ57MFrRvB9IZO6LDWDG2yF5Xq7mH06pCWERxCZUmPdbG5G5ei6VZAdRtUZaJ2K6+I3cUQY7FYb0cp5EDVlgblpU7TVHwOgYLRxRCocSI3gUqK+jmR6M0q87jZFiQLY=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=pobox.com; spf=pass smtp.mailfrom=pobox.com; dkim=pass (2048-bit key) header.d=pobox.com header.i=@pobox.com header.b=MPgRA+IS; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b=NcS42045; arc=none smtp.client-ip=103.168.172.151
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=pobox.com
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=pobox.com
Authentication-Results: smtp.subspace.kernel.org;
	dkim=pass (2048-bit key) header.d=pobox.com header.i=@pobox.com header.b="MPgRA+IS";
	dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="NcS42045"
Received: from phl-compute-07.internal (phl-compute-07.phl.internal [10.202.2.47])
	by mailfout.phl.internal (Postfix) with ESMTP id 79957EC024A;
	Fri, 11 Jul 2025 12:37:12 -0400 (EDT)
Received: from phl-frontend-01 ([10.202.2.160])
  by phl-compute-07.internal (MEProxy); Fri, 11 Jul 2025 12:37:12 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pobox.com; h=cc
	:cc:content-type:content-type:date:date:from:from:in-reply-to
	:in-reply-to:message-id:mime-version:references:reply-to:subject
	:subject:to:to; s=fm1; t=1752251832; x=1752338232; bh=a2uxGH7v5b
	pyD/b8jxhHJbhyrShA+MG61Z0mLrNfvwE=; b=MPgRA+IS5TTpReKQTi2921E8s4
	eKsKbAE4n5moxdG44Qgf02hv0XxkOfypM+v1QRgg/uTiGlFeqZtQoMD47NX0rGvh
	Iua6GL3muXwMHY3PXGwcRLWemaaSiln6Y9V4Cx/q1kTb4VIcMJY2o60I5PprtiJI
	yX9i0GKhYOoSHzs8zT6k/rdbSfv6p2gRj3y0xSlA+XOk8aa3HPQts2qzFzWMVDu+
	QZyOXq7UNFeC0/p4XUEIlp7mvxFg4sTsvDT6vXPRu+SowoTt+z7ErdS6CYulBTag
	rZwo+NhFZz87IzV4Y+7Z32rYf3cSkdza9urXJZM9LwR3KC9Cx9+VjtestYHg==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=
	messagingengine.com; h=cc:cc:content-type:content-type:date:date
	:feedback-id:feedback-id:from:from:in-reply-to:in-reply-to
	:message-id:mime-version:references:reply-to:subject:subject:to
	:to:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm2; t=
	1752251832; x=1752338232; bh=a2uxGH7v5bpyD/b8jxhHJbhyrShA+MG61Z0
	mLrNfvwE=; b=NcS42045wgBvaJ/FnEoo9WcZE3MkS6HRHTOxRsHjN41hDNbF3sX
	TmYvG4ZH99kyItmLqrLTf6GHE41OwQtrROTx3dyt/GqcXv0TuvJb5ejH7OTkGgni
	saiWjwXzBuFiYDdPBdU/jFMu44smkaswEzJl0FFUJGhhRDkzDUnrulfgOAC6wft8
	4Ksuy1SmqU5Kr8gx7SpG5ZeQxV9xXc17PO8kc6bM+Er6XkzSU/fo9X9EaI0lHooS
	fn+txJsFSaxydfqOrAkGewDbuNteUySQNj2RQNfohniHJ+CiNHnTO4brOxLz00VD
	NEmNAEURrjmd1LbCAB9JGEWE/eaPptYUdNg==
X-ME-Sender: <xms:tz1xaD9bfGgEJcX27cotkZ_ZRvbY3JnJwGKOUxNca4B-vE7KCfFcCA>
    <xme:tz1xaNRPReLU1m80S4Cd-R-2yeOpQcKbD2b1FKqeI38F9tdp5x008TWKjDuTZiUSO
    LmMnRqpjrY-AmjRLg>
X-ME-Received: <xmr:tz1xaHfjWpuc0uJ0HCjjeZEIP6nJejeimIwTDpSA_sJ-ChBQTp07MP8xvK3dadOYAX4HqYcRI_KP50KC2BnQSv1CJikzS7L8SBnD9Gs>
X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeffedrtdefgdegfeekvdcutefuodetggdotefrod
    ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpuffrtefokffrpgfnqfghnecuuegr
    ihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjug
    hrpefhvfevufgjfhffkfgfgggtsehttdertddtredtnecuhfhrohhmpefluhhnihhoucev
    ucfjrghmrghnohcuoehgihhtshhtvghrsehpohgsohigrdgtohhmqeenucggtffrrghtth
    gvrhhnpeejfeekteegkedtjeevgeekudduudefhfdvueefieeuteetveelieelfeekveef
    ieenucffohhmrghinhephhhtthhpqdhpuhhshhhinhhithdquggsihhnshhtrgifvggsrd
    hshhenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehg
    ihhtshhtvghrsehpohgsohigrdgtohhmpdhnsggprhgtphhtthhopeejpdhmohguvgepsh
    hmthhpohhuthdprhgtphhtthhopehushhmrghnrghkihhnhigvmhhivddtvdesghhmrghi
    lhdrtghomhdprhgtphhtthhopehgihhtsehvghgvrhdrkhgvrhhnvghlrdhorhhgpdhrtg
    hpthhtoheptghhrhhishgtohholhesthhugihfrghmihhlhidrohhrghdprhgtphhtthho
    pegthhhrihhsthhirghnrdgtohhuuggvrhesghhmrghilhdrtghomhdprhgtphhtthhope
    hmvgesthhtrgihlhhorhhrrdgtohhmpdhrtghpthhtohepphhssehpkhhsrdhimhdprhgt
    phhtthhopehgihhtshhtvghrsehpohgsohigrdgtohhm
X-ME-Proxy: <xmx:tz1xaBCYePmMevKq6n2RGLi6o2_t5rJrqjcqNFRE7DS5MIhE6KD6LQ>
    <xmx:tz1xaJl-BPIKc7XQ1GviyQYYKf8ZlGaL9LTu1Dcj0GavGmMXNwsljw>
    <xmx:tz1xaMe4jez5m-_J_203JCmxRi1wuRrbjjNI9Id8h9eCeIUQsXuGmw>
    <xmx:tz1xaNRxN4R2NMRuDcsrTDIKLsBZqSwsN0pdVfnTOOBKWAEr5jv7Fw>
    <xmx:uD1xaHAY1EYfI5GvUU-7CBz2NlOdW18yeEOgMuPGR6PLUcPt63JIP51A>
Feedback-ID: if26b431b:Fastmail
Received: by mail.messagingengine.com (Postfix) with ESMTPA; Fri,
 11 Jul 2025 12:37:11 -0400 (EDT)
From: Junio C Hamano <gitster@pobox.com>
To: Usman Akinyemi <usmanakinyemi202@gmail.com>
Cc: git@vger.kernel.org,  chriscool@tuxfamily.org,
  christian.couder@gmail.com,  me@ttaylorr.com,  ps@pks.im
Subject: Re: [PATCH v3 6/7] t/t1517: move verify-commit -h test to t1517
In-Reply-To: <CAPSxiM_ZZrbFpgvxqYgZ8oeTbRs+HW=rM+9Dud0G_Qr7eq3=FA@mail.gmail.com>
	(Usman Akinyemi's message of "Fri, 11 Jul 2025 04:29:30 +0530")
References: <20250706214108.714499-1-usmanakinyemi202@gmail.com>
	<20250706215039.715732-1-usmanakinyemi202@gmail.com>
	<20250706215039.715732-7-usmanakinyemi202@gmail.com>
	<xmqqtt3o3rqm.fsf@gitster.g>
	<CAPSxiM_ZZrbFpgvxqYgZ8oeTbRs+HW=rM+9Dud0G_Qr7eq3=FA@mail.gmail.com>
Date: Fri, 11 Jul 2025 09:37:10 -0700
Message-ID: <xmqqcya63cqx.fsf@gitster.g>
User-Agent: Gnus/5.13 (Gnus v5.13)
Precedence: bulk
X-Mailing-List: git@vger.kernel.org
List-Id: <git.vger.kernel.org>
List-Subscribe: <mailto:git+subscribe@vger.kernel.org>
List-Unsubscribe: <mailto:git+unsubscribe@vger.kernel.org>
MIME-Version: 1.0
Content-Type: text/plain

Usman Akinyemi <usmanakinyemi202@gmail.com> writes:

>> But in the longer run, we are very much likely that we'd want to
>> test something that needs things that require prerequisites (like
>> "do this only where XYZ is installed") but ought to work outside a
>> repository, which means t1517 would need to pull in things like
>> lib-gpg.sh only because it has a few tests about verify-blah
>> command.  These tend to accumulate over time.
>
> I understand the concern and I felt we should at least decide where to
> put the "verify -h" because, right now, we have some of them in the
> t1517 and also some in their respective test files.

If t1517 were only about "git subcmd -h outside a repository" for
various subcommands, that would be a happy arrangement.  I think we
even have a way to iterate over all Git subcommands, current or
future, so your patch may become "we've sprinkled 'subcmd -h' tests
in various scripts, but now t1517 will do that automatically so
anybody who add a new command do not have to do anything".

But if t1517 currently (before your series) already has other things
tested, that changes the story somewhat.  Especially if we aim for
the automated solution, we may want to move existing tests in 1517
that is not about "subcmd -h" out to different scripts.  Obvious
two choices are:

 - We spread them to existing test scripts for the command being
   tested (e.g. "does patch-id work correctly outside a repo?"
   moves to t4204-patch-id, and "does update-server-info work OK
   inside and outside a repo?" can be split and one half moves to
   t5200-update-server-info).

 - We move them all to a new test script that is dedicated for "do
   various subcommands work outside a repo to do things other than
   responding to '-h'?".

and I would favour the former.

The only reason why you moved these to t1517 is because the set-up
part of that script sets up the ceiling just once properly and let
its tests do as if they are running outsie a repository, and having
to arrange the ceiling correctly to add a few test in various
scripts so that each of these scripts can test their single
subcommand pretending that it is running outside a repository looked
cumbersome, right?  And I do agree with you, if that was the reason,
that it is annoying to have to set up the ceiling manually in each
test script.  But then can we do it less annoying?  We already made
a nongit test helper and it may be good enough to help existing
tests in t1517.

As an illustration, here is what the beginning of the former
approach may look like.


 t/t1517-outside-repo.sh       | 27 +++++++++++++++++++++------
 t/t5200-update-server-info.sh |  5 +++++
 2 files changed, 26 insertions(+), 6 deletions(-)

diff --git c/t/t1517-outside-repo.sh w/t/t1517-outside-repo.sh
index 6824581317..c1294d5761 100755
--- c/t/t1517-outside-repo.sh
+++ w/t/t1517-outside-repo.sh
@@ -107,11 +107,26 @@ test_expect_success LIBCURL 'remote-http outside repository' '
 	test_grep "^error: remote-curl" actual
 '
 
-test_expect_success 'update-server-info does not crash with -h' '
-	test_expect_code 129 git update-server-info -h >usage &&
-	test_grep "[Uu]sage: git update-server-info " usage &&
-	test_expect_code 129 nongit git update-server-info -h >usage &&
-	test_grep "[Uu]sage: git update-server-info " usage
-'
+for cmd in $(git --list-cmds=main)
+do
+	cmd=${cmd%.*} # strip .sh, .perl, etc.
+	case "$cmd" in
+	archimport | cvsexportcommit | cvsimport | cvsserver | daemon | \
+	difftool--helper | filter-branch | fsck-objects | get-tar-commit-id | \
+	http-backend | http-fetch | http-push | init-db | instaweb.sh | \
+	merge-octopus | merge-one-file | merge-resolve | mergetool | \
+	mktag | p4 | p4.py | pickaxe | quiltimport | remote-ftp | remote-ftps | \
+	remote-http | remote-https | replay | request-pull | send-email | \
+	sh-i18n--envsubst | shell | show | stage | submodule | svn | \
+	upload-archive--writer | upload-pack | web--browse | whatchanged)
+		expect_outcome=expect_failure ;;
+	*)
+		expect_outcome=expect_success ;;
+	esac
+	test_$expect_outcome "'git $cmd -h' outside a repository" '
+		test_expect_code 129 nongit git $cmd -h >usage &&
+		test_grep "[Uu]sage: git $cmd " usage
+	'
+done
 
 test_done
diff --git c/t/t5200-update-server-info.sh w/t/t5200-update-server-info.sh
index 8365907055..a551e955b5 100755
--- c/t/t5200-update-server-info.sh
+++ w/t/t5200-update-server-info.sh
@@ -46,4 +46,9 @@ test_expect_success 'midx does not create duplicate pack entries' '
 	test_must_be_empty dups
 '
 
+test_expect_success 'update-server-info does not crash with -h' '
+	test_expect_code 129 git update-server-info -h >usage &&
+	test_grep "[Uu]sage: git update-server-info " usage
+'
+
 test_done

From mboxrd@z Thu Jan  1 00:00:00 1970
Received: from mail-pg1-f173.google.com (mail-pg1-f173.google.com [209.85.215.173])
	(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
	(No client certificate requested)
	by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9654B27FB22
	for <git@vger.kernel.org>; Mon, 21 Jul 2025 11:55:26 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.215.173
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
	t=1753098927; cv=none; b=obvLPaXamFc75Q+TN+GQJxfWlQ2ZD1fbqMwQnMNIe0d9jtXqnxicQeixhMi7zuRDfVw5vsGVYT9YtwU0o6cO8C01b0FMMdXQMWwTrx7fSa5HEbjzwaxSjIo2dVLo12Yd+cXEsS7G10Bd3OWINNkzTfDkvMfl+WaA/qcS36peiYE=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
	s=arc-20240116; t=1753098927; c=relaxed/simple;
	bh=8aD+6K/hTtOp98bqnXpdP0hQNlfUijVGdQTnG3eHt6o=;
	h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References:
	 MIME-Version; b=TKwv/0ye555AuKQ1qjbiAqRYTg0mAiTkDvNsPmYmgIcOm0fyfzb3CG5rtawYP7zzfWR6bkIRBBqUIxk4d9lJ1c4l2aN7TqB+bky6pr0Y0l4yrRhALJxswO4gYDZhB6tsclOGvFvtuGr3uJSjpm0nC/mJL3Q2q6jP0+r6egvGa90=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=bvCI9dij; arc=none smtp.client-ip=209.85.215.173
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.b="bvCI9dij"
Received: by mail-pg1-f173.google.com with SMTP id 41be03b00d2f7-b31c84b8052so4641424a12.1
        for <git@vger.kernel.org>; Mon, 21 Jul 2025 04:55:26 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=20230601; t=1753098925; x=1753703725; darn=vger.kernel.org;
        h=content-transfer-encoding:mime-version:references:in-reply-to
         :message-id:date:subject:cc:to:from:from:to:cc:subject:date
         :message-id:reply-to;
        bh=8L8HjHNclbEBk0+y+tYNwhbMs4RDIayjqzVgLc26PAM=;
        b=bvCI9dijd7JU60ilugv+BqbYqiG6Ye/APoMJV7hiNBmmEd0zfARfFEMFajlG2oPSq3
         K36ndwRsKo6K6+Vjdd/bAvDKQHv09CGP9sxFU4uAZWASlhE/m9zX1PJoiIQp0TaazAiX
         mb2GT3DF4rDhzDN9Dpwn765zmT/hXCVjoCMs1ygIHgVxXgKLOxOchiQchDeAsl8XQcgZ
         8kT+D/xZ/We9wCHkWmTiEzlO2aUUq/axU5aNoFyIJxLrv5rJt8ILM35v2Olm9vnn1BrE
         m30EivsZyWhcPi/zXRvXQqWaVqg/tiL4zNFZR8H10MFGL5sXT2biIjX77Hlp0spNTPfe
         rxvw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20230601; t=1753098925; x=1753703725;
        h=content-transfer-encoding:mime-version:references:in-reply-to
         :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc
         :subject:date:message-id:reply-to;
        bh=8L8HjHNclbEBk0+y+tYNwhbMs4RDIayjqzVgLc26PAM=;
        b=P6ze0L11ypLUfwwderWyWa95SOiRKOLf6c/9EtklaKFXicM2/4h9YqyFIvWgNc9nFS
         qcKTxhbGN5BovlTKV28xChplxS3xL5XftMDK2gxLdqcpJm7OGgfwzD2Er13ad4scVc6x
         AvOZuFQBaLHgcugbWL2/WchM9qIW336xl4TMA4Jqk4YGmb+ar/nUBcN8EDPRla4xa2Wg
         wxyFTVsSEWo/weIZE57b2Nf5y2+ZOMgBMXOHOrEgma6OnzqFT44c2TL6jMmfj6X/5KGc
         Jk2+TPzlGotjX4Ojfq+Gd+b6bQE1TF8i1JAyvsKLLVvImDhO+RY+NiSqkIQtP/0uLeU4
         z1rg==
X-Gm-Message-State: AOJu0YxsIQBxTs9Bul9E63Wix3GLm46jSz6c+4ImuBxIifXaKVc4D0nz
	091XTrXSY+31JXc0ILskzLtuYLtrsPKOyMEPTCYz+F8gJG9XFtepHK+HeCFxTLoQN/w=
X-Gm-Gg: ASbGncsDvxnXFdC/7+S5B3vKnB/QPPTFqoVc5+AB7EhipsTNI4UW2pYpEfttiMVzuKU
	Hpr6rUwcpsX8PadWs40wYFtMLPtoP8lcTPuovPjzqg8r0/0+2IASg5pPiiI18zZxd9pEGhQP8E1
	+epKRMv3i0akulKtVHbcSGcHwvyFvUeaVBv5FRMnNYrCSLNnhld/2MBn7g5FdQt6AjWlFyo30hz
	MxuTdDDYLDbQrTc9l3o0SjrYJ9BayHg5BOCMbzkG7s1Tcs5Eg8Sz3liKW3wWIzKWY8Tve40GKP1
	E028bJ5xD0eX5WsOSctW6sanmpVQ3f6BAMZvgwnnDu6M77IyIhSpj65/iURYJunK3w7IY6Dd611
	APIx6l1woWZNMSgPkC1yw48aGuzJfTOrbmzBvM3tjeteLxuU=
X-Google-Smtp-Source: AGHT+IG1mNVmnhMOJCd505fcxI6vNUHO38IKXQNJUT9s/eFvJu/ZVvTU4wrsLRzhgluSBzwusCrtbw==
X-Received: by 2002:a05:6a20:9188:b0:233:f0c6:a8a4 with SMTP id adf61e73a8af0-2390dc51bc4mr31909941637.31.1753098925264;
        Mon, 21 Jul 2025 04:55:25 -0700 (PDT)
Received: from archlinux.plaksha.edu.in ([202.164.41.66])
        by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-b3f2ffbce6esm5135940a12.72.2025.07.21.04.55.22
        (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
        Mon, 21 Jul 2025 04:55:24 -0700 (PDT)
From: Usman Akinyemi <usmanakinyemi202@gmail.com>
To: git@vger.kernel.org
Cc: gitster@pobox.com,
	chriscool@tuxfamily.org,
	christian.couder@gmail.com,
	me@ttaylorr.com,
	ps@pks.im,
	usmanakinyemi202@gmail.com
Subject: [PATCH v4 0/2] refactor t1517 to focus on help output outside a repository 
Date: Mon, 21 Jul 2025 17:25:17 +0530
Message-ID: <20250721115519.140361-1-usmanakinyemi202@gmail.com>
X-Mailer: git-send-email 2.50.0
In-Reply-To: <xmqqcya63cqx.fsf@gitster.g>
References: <xmqqcya63cqx.fsf@gitster.g>
Precedence: bulk
X-Mailing-List: git@vger.kernel.org
List-Id: <git.vger.kernel.org>
List-Subscribe: <mailto:git+subscribe@vger.kernel.org>
List-Unsubscribe: <mailto:git+unsubscribe@vger.kernel.org>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit

This series refactors t1517-outside-repo.sh to focus on testing
`git subcmd -h` outside a Git repository. It does two things:

  1. Moves the existing `update-server-info -h` test to t5200, since it
     tests behavior *inside* a repo and belongs with other update-server-info
     tests.
  
  2. Introduces a loop in t1517 that automatically verifies `-h` output
     for all main Git subcommands when run outside a repository, using
     the `nongit` helper and `git --list-cmds=main`.

This makes t1517 easier to maintain and ensures that new commands are
automatically covered for this class of behavior.


Changes since v3:
  - Changes the approach from having the t1517 to test
  both help outside and inside repo to just having inside repo.

Usman Akinyemi (2):
  t/t1517: automate `git subcmd -h` tests outside a repository
  t5200: move `update-server-info -h` test from t1517

 t/t1517-outside-repo.sh       | 28 ++++++++++++++++++++++------
 t/t5200-update-server-info.sh |  5 +++++
 2 files changed, 27 insertions(+), 6 deletions(-)

-- 
2.50.0


From mboxrd@z Thu Jan  1 00:00:00 1970
Received: from mail-pf1-f172.google.com (mail-pf1-f172.google.com [209.85.210.172])
	(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
	(No client certificate requested)
	by smtp.subspace.kernel.org (Postfix) with ESMTPS id 75FE427FB22
	for <git@vger.kernel.org>; Mon, 21 Jul 2025 11:55:29 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.172
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
	t=1753098930; cv=none; b=GiuNAPgtkzrb4ObLPOE6GwcP5zCBnkJLqhcPBjbhjLwMz4bLEq77rqWO1V//ZtnAgTMff4fL1fiqW5GXQTuLLfXLzerjiFJp+LJog0R0Imx+t7F9REYABoo7cDpcUNOyTNeQgLa42U8UW4GbWTqVDfOsUBMMl619+TwGbHNYFMA=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
	s=arc-20240116; t=1753098930; c=relaxed/simple;
	bh=G29U+opAEDQHY0KMDxDDxq86osSxjlPABpCqUTVagSg=;
	h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References:
	 MIME-Version; b=ntmx/HzmR81RfEDvuMATtkALQPWFfhSNTtnml0t9pdXxnjFqG3zVT+dpcltNsYKnI9bGsPEcHbpFaM5SW3/LuVSQgj8LQVnfPGj3igkqx9Z9cSIesMvvpC2I1DxD85O2pKKTT7GKv03IQyYCV3WYVlpkv/z0j9tqOqb3uQ4FO2Y=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=Ee5TEcCM; arc=none smtp.client-ip=209.85.210.172
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.b="Ee5TEcCM"
Received: by mail-pf1-f172.google.com with SMTP id d2e1a72fcca58-74b54af901bso2683339b3a.2
        for <git@vger.kernel.org>; Mon, 21 Jul 2025 04:55:29 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=20230601; t=1753098928; x=1753703728; darn=vger.kernel.org;
        h=content-transfer-encoding:mime-version:references:in-reply-to
         :message-id:date:subject:cc:to:from:from:to:cc:subject:date
         :message-id:reply-to;
        bh=FD4Vx97hvk05x5XihyhkXUHLyuiJgTrDUx4jkzo66us=;
        b=Ee5TEcCMxkGPMgk62TYe/s7A8lbT712b0FFonQFID4XoCAZ2aqDA5m3q7G+2bxF0nf
         4/TKulBh+mFE5szaI2oMCJ172KVFjK495Gbp7q3yIy9W9ynx6XEdfLvpwrkxIlelOUXE
         hRqkYU1A1t8dbMS2bhy3M3CcfByb/wIFbBmYdPhfFh09J6UhobUZZLfI9gR02+TKTsOz
         DvpWx7Jn0tcmOV+j0VrpgrAZeGcD3JrziIMj0bfANXrYS1AMYowun8PyOYx2BjVZmrx6
         G3KyKD3h4HZgtC1Y9/Fb/ZkUd2yNpss3nsorT98LcaMfbkHw/FsDqGBG0j+OV+WPCTjX
         Lw/g==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20230601; t=1753098928; x=1753703728;
        h=content-transfer-encoding:mime-version:references:in-reply-to
         :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc
         :subject:date:message-id:reply-to;
        bh=FD4Vx97hvk05x5XihyhkXUHLyuiJgTrDUx4jkzo66us=;
        b=GzivGgzxB8GFqdrHFHQy4WB+DTEG/ofgPDtLqnqTAT1Qw6gAtRDSsbC8th2lSAWabs
         yiyofp5K/7xf6m0RiBwa1UplP6dIq1/CSjhZoOPF5kF+d44izBoJqV65XTJDiHHaNozL
         8/+NoRy7gnm3IDnQMp3Bp99zchpeD+Tewd/Y4JRNQAvIUZpnv9CRWP4PHoOr/sbnrzW4
         bh81aXSrMKTuUmutxWzU5fwZpQQm5Fn9faeN5GH6xPzJP+K2EfR414/p81Jv7fi+B6bZ
         PmOeRM4UQ9IvW4OjCduFu2sVNjhAtpClJn1TVkddjDVY+iwiLAFVGwb1lY3jjtuHqwTk
         mapw==
X-Gm-Message-State: AOJu0Ywk8Jlf26irqwqtD8QjxSzpaAu5NKCDvkFKq4rVfVTPofvkh87g
	/ypZKoiZ072aLE/cHF//fB7QGMBjEKei/uLe1SM15oKfqJ5vOKU7xeT+FDyfzqBAncs=
X-Gm-Gg: ASbGncvvX5KR3JPmbOXCUS8IZPM0OFBRaGqYp9LQIyHCwUmZ5kkZqxfQwDnGCeDx3ny
	wRB/smhhNW084AbW0zcqXgMP+D87m76pCkBD0u73Q8CUSjIeEla1rLsPvVdMWfEPd2Q969vq6O4
	gD4P0G0d+gWrGOxtqrtB32lspT9iVEtKT16fLhN0LwlD2fN21c0N1F7RsHUKkiPl/2REZWKsYAi
	oOc3x/FeQ5jNswMcscE7+l8iGDlLOExjXYqkMVfjbk0pY5TvBP7jarfKdn5zt+hjEJLz8UOqorB
	Hv1OC45w35WCR8uQm4PCyJ1xcyy8lewr2+PV2Kw/genTqhpgVzggK2yjQXNCq4AI34GXtC2bkI7
	mFWk9Tf14tiVGN07lbHyggWK0QrElMeYR6kBcA/1X/kx2lQc=
X-Google-Smtp-Source: AGHT+IEdfqbFbGkU3xPA2pqVYLiA/UcU6lcPSIHHpXmjg7PPfEIMFFIbo+50XTyzCrEzkzG4+otSsQ==
X-Received: by 2002:a05:6a21:1709:b0:232:4a42:dfd1 with SMTP id adf61e73a8af0-237d866f981mr32178646637.36.1753098928380;
        Mon, 21 Jul 2025 04:55:28 -0700 (PDT)
Received: from archlinux.plaksha.edu.in ([202.164.41.66])
        by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-b3f2ffbce6esm5135940a12.72.2025.07.21.04.55.25
        (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
        Mon, 21 Jul 2025 04:55:28 -0700 (PDT)
From: Usman Akinyemi <usmanakinyemi202@gmail.com>
To: git@vger.kernel.org
Cc: gitster@pobox.com,
	chriscool@tuxfamily.org,
	christian.couder@gmail.com,
	me@ttaylorr.com,
	ps@pks.im,
	usmanakinyemi202@gmail.com
Subject: [PATCH v4 1/2] t/t1517: automate `git subcmd -h` tests outside a repository
Date: Mon, 21 Jul 2025 17:25:18 +0530
Message-ID: <20250721115519.140361-2-usmanakinyemi202@gmail.com>
X-Mailer: git-send-email 2.50.0
In-Reply-To: <20250721115519.140361-1-usmanakinyemi202@gmail.com>
References: <xmqqcya63cqx.fsf@gitster.g>
 <20250721115519.140361-1-usmanakinyemi202@gmail.com>
Precedence: bulk
X-Mailing-List: git@vger.kernel.org
List-Id: <git.vger.kernel.org>
List-Subscribe: <mailto:git+subscribe@vger.kernel.org>
List-Unsubscribe: <mailto:git+unsubscribe@vger.kernel.org>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit

Replace manual `-h` tests with a loop over all subcommands using
`git --list-cmds=main`. This ensures consistent coverage of `-h`
behavior outside a repo and future-proofs the test by covering
new commands automatically.

Known exceptions are skipped or marked as expected failures.

Suggested-by: Patrick Steinhardt <ps@pks.im>
Helped-by: Junio C Hamano <gitster@pobox.com>
Signed-off-by: Usman Akinyemi <usmanakinyemi202@gmail.com>
---
 t/t1517-outside-repo.sh | 25 +++++++++++++++++++++++--
 1 file changed, 23 insertions(+), 2 deletions(-)

diff --git a/t/t1517-outside-repo.sh b/t/t1517-outside-repo.sh
index 6824581317..9fcebb7d94 100755
--- a/t/t1517-outside-repo.sh
+++ b/t/t1517-outside-repo.sh
@@ -110,8 +110,29 @@ test_expect_success LIBCURL 'remote-http outside repository' '
 test_expect_success 'update-server-info does not crash with -h' '
 	test_expect_code 129 git update-server-info -h >usage &&
 	test_grep "[Uu]sage: git update-server-info " usage &&
-	test_expect_code 129 nongit git update-server-info -h >usage &&
-	test_grep "[Uu]sage: git update-server-info " usage
 '
 
+for cmd in $(git --list-cmds=main)
+do
+	cmd=${cmd%.*} # strip .sh, .perl, etc.
+	case "$cmd" in
+	archimport | cvsexportcommit | cvsimport | cvsserver | daemon | \
+	difftool--helper | filter-branch | fsck-objects | get-tar-commit-id | \
+	http-backend | http-fetch | http-push | init-db | instaweb.sh | \
+	merge-octopus | merge-one-file | merge-resolve | mergetool | \
+	mktag | p4 | p4.py | pickaxe | quiltimport | remote-ftp | remote-ftps | \
+	remote-http | remote-https | replay | request-pull | send-email | \
+	sh-i18n--envsubst | shell | show | stage | submodule | svn | \
+	upload-archive--writer | upload-pack | web--browse | whatchanged)
+		expect_outcome=expect_failure ;;
+	*)
+		expect_outcome=expect_success ;;
+	esac
+	test_$expect_outcome "'git $cmd -h' outside a repository" '
+		test_expect_code 129 nongit git $cmd -h >usage &&
+		echo "Hello" &&
+		test_grep "[Uu]sage: git $cmd " usage
+	'
+done
+
 test_done
-- 
2.50.0


From mboxrd@z Thu Jan  1 00:00:00 1970
Received: from mail-pf1-f180.google.com (mail-pf1-f180.google.com [209.85.210.180])
	(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
	(No client certificate requested)
	by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6B72A27FB22
	for <git@vger.kernel.org>; Mon, 21 Jul 2025 11:55:32 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.180
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
	t=1753098933; cv=none; b=h8rnXipVnOath4faqtjKX2Ko5iKEGyq+h4PlaC+tRfWiX15rgciSZhM3XgNG2G2u8cO2/x+8yPMeD6CrvtBWOWHg8SIrG57sp8+NYkJE6ApqHg2nIY4P6i6x+nr2bRNYFK3/KzwA4aY/9hVH1wE/xcRpcDTM8hMHkxIGGF4qdbE=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
	s=arc-20240116; t=1753098933; c=relaxed/simple;
	bh=NLE+xO/YWenZwWIrk1x10nFPoQncFqkHatRJRYw0Qp8=;
	h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References:
	 MIME-Version; b=nTs15Kgh7ajhU0fLLCGo6POhAfs8grizJgUCPXb0oqPveHJcDIJiZk+J2+in2ftQ17OAbVr1P1gEZHblMaAvrmGMeYaUn4Kv3qSFp/bkr61KXXuhuv4eoalcNvMFSVHf9UEeHaQiTLQW1jDoiDJDFfueDzCsUZgvJPBJ9B+Ee8s=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=mD8Er5Y0; arc=none smtp.client-ip=209.85.210.180
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.b="mD8Er5Y0"
Received: by mail-pf1-f180.google.com with SMTP id d2e1a72fcca58-7425bd5a83aso3555428b3a.0
        for <git@vger.kernel.org>; Mon, 21 Jul 2025 04:55:32 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=20230601; t=1753098931; x=1753703731; darn=vger.kernel.org;
        h=content-transfer-encoding:mime-version:references:in-reply-to
         :message-id:date:subject:cc:to:from:from:to:cc:subject:date
         :message-id:reply-to;
        bh=G2FsMzTd/ZVm/PiWu3XSBnlIT3/bwlS8peLvAnCYpmc=;
        b=mD8Er5Y0I+Kk0/nJABwJwuw+YUASl0F5hTtE69rwcH1A/OJvPKzIYdgXXb+Vzk0q58
         PJNWqqqaczHkhEXq+2O1zT2y+xLQNi5hGLiQCoAMNBE0qFHNJHXS53kXZTUBJTTe519w
         GRjfJ/M4yn/iZ9+Bq6+kc19YibV4fOkpV5HCs4BwAH/qCaCMGNuDkxnHK+jMBycKhLMl
         bJ5hm6fSHsO/418XDNVti20vur064Il3TWzDH3+8iPMMr+OYSvY7aBZnTKO2znRAgMda
         ch4gz2YCXKjZmLwr5JzB3lCU/PQdlZrxUPC6rlUPEgyZIzsU7nQlGINYF4YvaF5X1HWv
         xOug==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20230601; t=1753098931; x=1753703731;
        h=content-transfer-encoding:mime-version:references:in-reply-to
         :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc
         :subject:date:message-id:reply-to;
        bh=G2FsMzTd/ZVm/PiWu3XSBnlIT3/bwlS8peLvAnCYpmc=;
        b=clEuPPJC8piuOZD++rZI4w/rGGRIM6PbNm+ESbNFju7pbeiAFU94//kQ92yBZSHW5U
         poDyE2f3F805TioXEukdnYPTNv6TuLqsf8Ur3LD1rUP3Ys9aQzNAdHWwxXgGBgTqMQzf
         UU+IH5sP3LsnlZG1qeaeHdgjZg62qIO0waLWcTgdz3wGyNLdrQUuiKaIvWYsDxk13FRp
         TDKDFDbFkRCC8CQv8QnDzzge6MRwwZho9bCcNZFSsVm8zEWTq57KzvT5zctQR4oSc7Jw
         Q2Rw8sHJl2MCkdeiHPbqypWM/vUW7Ldp/+bX9QJ3p6082bKaCI9Ph+fqmhMXoLoQ3C6L
         qNYg==
X-Gm-Message-State: AOJu0Yx0/g8uzFLW6qHw0+G0eFTYRRx/3rvUsWfLtuqIicj0WycM6+04
	ehD5WDGG7npYqgm/cRGPNbvk8jp1IC6Iyb2RSPHDFFrrQRld5FBbkJks6hdDLLzbUh4=
X-Gm-Gg: ASbGnctTyCxbuOEaE7Fuu5FkQYQ4P0PJaTZegzXRlkc0B48X7L9Rdv3DlcuxH1uNPmU
	8FICOuB5B23iGsYOQ9TBibgCxtFNxhic5E7wsEmXxyJz9nCjqZpY8XDZWubZsvmxlY4tjKgFiIx
	UzJtWBTnrDg5Am/SGXT9xTMvhqR542Iyl/zN28E0e+Zy5CKfv63KFL4TEaLZlxdNF17xD436l8F
	wfrspbn65puE4CNAr+TtwhXoqQmkbujZ/62h9J4K8WieL6jv/1+YGqQMQicX9gg62M6zkVsWiy3
	NG2rdyElFggflfsCWVBpmMTT1C+frUHfXZf1aUOCqHosNlwtYNEU8JP7ZjJcbVG9bp6rfFwykec
	c64Vis4Bni3uymMUo83eMvKIOXDBS7LD0raXtHpKmzpJ05yQ=
X-Google-Smtp-Source: AGHT+IF8fJBPcAc5/cz5PUnHNDoI9y67AbdPdkhu197mDJ42msB8Wp3n/pCCExCBFWMFgRDE1okWpg==
X-Received: by 2002:a05:6a21:998b:b0:237:d013:8a78 with SMTP id adf61e73a8af0-2381484403bmr31960103637.37.1753098931532;
        Mon, 21 Jul 2025 04:55:31 -0700 (PDT)
Received: from archlinux.plaksha.edu.in ([202.164.41.66])
        by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-b3f2ffbce6esm5135940a12.72.2025.07.21.04.55.28
        (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
        Mon, 21 Jul 2025 04:55:31 -0700 (PDT)
From: Usman Akinyemi <usmanakinyemi202@gmail.com>
To: git@vger.kernel.org
Cc: gitster@pobox.com,
	chriscool@tuxfamily.org,
	christian.couder@gmail.com,
	me@ttaylorr.com,
	ps@pks.im,
	usmanakinyemi202@gmail.com
Subject: [PATCH v4 2/2] t5200: move `update-server-info -h` test from t1517
Date: Mon, 21 Jul 2025 17:25:19 +0530
Message-ID: <20250721115519.140361-3-usmanakinyemi202@gmail.com>
X-Mailer: git-send-email 2.50.0
In-Reply-To: <20250721115519.140361-1-usmanakinyemi202@gmail.com>
References: <xmqqcya63cqx.fsf@gitster.g>
 <20250721115519.140361-1-usmanakinyemi202@gmail.com>
Precedence: bulk
X-Mailing-List: git@vger.kernel.org
List-Id: <git.vger.kernel.org>
List-Subscribe: <mailto:git+subscribe@vger.kernel.org>
List-Unsubscribe: <mailto:git+unsubscribe@vger.kernel.org>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit

t1517 is now focused on testing subcommands outside a repository.
Move the in-repo `-h` test for `update-server-info` to t5200,
which covers this command.

Suggested-by: Patrick Steinhardt <ps@pks.im>
Helped-by: Junio C Hamano <gitster@pobox.com>
Signed-off-by: Usman Akinyemi <usmanakinyemi202@gmail.com>
---
 t/t1517-outside-repo.sh       | 5 -----
 t/t5200-update-server-info.sh | 5 +++++
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/t/t1517-outside-repo.sh b/t/t1517-outside-repo.sh
index 9fcebb7d94..a1c644dffa 100755
--- a/t/t1517-outside-repo.sh
+++ b/t/t1517-outside-repo.sh
@@ -107,11 +107,6 @@ test_expect_success LIBCURL 'remote-http outside repository' '
 	test_grep "^error: remote-curl" actual
 '
 
-test_expect_success 'update-server-info does not crash with -h' '
-	test_expect_code 129 git update-server-info -h >usage &&
-	test_grep "[Uu]sage: git update-server-info " usage &&
-'
-
 for cmd in $(git --list-cmds=main)
 do
 	cmd=${cmd%.*} # strip .sh, .perl, etc.
diff --git a/t/t5200-update-server-info.sh b/t/t5200-update-server-info.sh
index 8365907055..a1f129db4e 100755
--- a/t/t5200-update-server-info.sh
+++ b/t/t5200-update-server-info.sh
@@ -46,4 +46,9 @@ test_expect_success 'midx does not create duplicate pack entries' '
 	test_must_be_empty dups
 '
 
+test_expect_success 'update-server-info does not crash with -h' '
+	test_expect_code 129 git update-server-info -h >usage &&
+	test_grep "[Uu]sage: git update-server-info " usage &&
+'
+
 test_done
-- 
2.50.0


From mboxrd@z Thu Jan  1 00:00:00 1970
Received: from mail-ed1-f41.google.com (mail-ed1-f41.google.com [209.85.208.41])
	(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
	(No client certificate requested)
	by smtp.subspace.kernel.org (Postfix) with ESMTPS id D7349241103
	for <git@vger.kernel.org>; Sat, 26 Jul 2025 14:34:50 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.41
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
	t=1753540492; cv=none; b=GOqbp8o8xD55Pg+neHy1UDV5CcjW/jyvBr9h6/s9NJOdS8ZYlt6rNLQn5u+1yMaOhov4GOr2YeVaDr//M2V0XjF31TuOIefz6bz833ZChJfVSG4k8RCsRVrFf5JC7P7XLF9OD6if+tgm/IR9iRGvLYEgNvCKrArUAmRJ0kTyXfY=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
	s=arc-20240116; t=1753540492; c=relaxed/simple;
	bh=QDOGlPzuWJDVuopbf27qpiRnDIcOhFGzzqkdkFF99dk=;
	h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject:
	 To:Cc:Content-Type; b=VLwX0HoklJsIe/7sjTbZdPnTJ+/0oMo6FqbpZude4YiMm52g9rkrg2HiBGP6voN+MFvaNduoxEeXu5diggm4PP6FVLKRyc9t7L/dnXHXuSQR2pJF1RNvH/LXTH0mcTAG5V6cM6CrfxXdH6h3TrJ2WLxMhU64qPctJaQ5+9/r8zM=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=Q7LDkBRt; arc=none smtp.client-ip=209.85.208.41
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.b="Q7LDkBRt"
Received: by mail-ed1-f41.google.com with SMTP id 4fb4d7f45d1cf-607ec30df2bso5730020a12.1
        for <git@vger.kernel.org>; Sat, 26 Jul 2025 07:34:50 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=20230601; t=1753540489; x=1754145289; darn=vger.kernel.org;
        h=content-transfer-encoding:cc:to:subject:message-id:date:from
         :in-reply-to:references:mime-version:from:to:cc:subject:date
         :message-id:reply-to;
        bh=54cUlqJUZWE6OowFmMwnD5/bO0XpzOJZnUgHPdKoTFM=;
        b=Q7LDkBRt2Pb4CvUI0zIBvNTqYSs26kOeJSZCOIybgqXsMpwljPTNBBY+y81lnR0Vs/
         Pr2jjXeRq6PvYydINfSV4Is3pFiMnTgAFXaeqr9oBHgZafJzU5TVK09cLRgjHuTmai8c
         SG8j+J7i0mgSPdNiL7Sv9DrLQTPyJXiHd/w6mVnT2GpS8GIwnqYprtUHtH+jnQrKyHeK
         ovw4jlul+45UpsEYGzHVOMxc8GJWOCfJUajQRCvcKLR0N4GOAil447Pj5hS2HSqaVZwo
         o77HIvYXAr5ITU+oVBzB0ceSQG9zD7/rwHXD/EPTV2xNDY+vUpPcRrnfmTHtK7PBCVIb
         1ztQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20230601; t=1753540489; x=1754145289;
        h=content-transfer-encoding:cc:to:subject:message-id:date:from
         :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc
         :subject:date:message-id:reply-to;
        bh=54cUlqJUZWE6OowFmMwnD5/bO0XpzOJZnUgHPdKoTFM=;
        b=AZ3XUcQ+3/kXH+rXzMXX5X9V2kcQhzEJqbUN7DZZgc6hK+vH2SRE0WX2DbWrGTYlSJ
         CFkYA+47Jm61g+ktUZzbCEZJxUJVVQRmUxr1lw5bMCFp01QeRYgSTMw+KNKpeTSDfrYR
         cD+9OvpntAy4lLKFTIeL/jmUyXFu0feoHT249snvcCGwE18VWixz+NK5Jju0lOox/T7k
         jD70VvaIKI/G6laEAn27nd+w3mvdUtdJ46wScM5nUHzNMQSk2VOmmMQu6qqno0xLiVFh
         FwOauFJtBFabU9d4dRZsZWhAbqnET9tJCByRmK/BVWe0CVoEq1wz7PTxoy71tPH2RC2O
         1SAw==
X-Gm-Message-State: AOJu0YzLW5O8P70SjJEZcI22TDi8Y49AwVVKZar8CdO9mFVL4FY88vAR
	QPvuzM1kC4rbbOkDLhfKe0wHPALfGhRZ93QLc0VbNtOXXFNQ0iWtnih9nX8X6My/jYYU3waz+Bj
	QKc9VlmffCJmp1mZa3HmUzm3NP+9ssZra7wJM
X-Gm-Gg: ASbGnctQWWa6KwibzYOIf7KpTP6D5gBtzAkSOi4vUiNVpTyr4mfu+i7qug+UCrsCb7b
	kUUVhX6YldRvwXXAWD8/aRNiYQLrgn7F3kHwUvKr3cipiBpaXB5q380PWvdqEfUrUuQqhEUhiSK
	7EbrbbywdgGo1y1y0og52uQXGE/6rCSDbyDnQXRGDKqr4Et7qCvJlyCTQ8DGauXc4dzqwULFmpN
	VkyTVk9VRWx0meXG18CIdXC2+MBBI9wYIUFgThM8g==
X-Google-Smtp-Source: AGHT+IFhTNh1xLqe3EoYGytJ8vvPLzdNbpYUqzN+0mZqJHrQcA2zThUTr/GtU+6O0Gf1y1KOJwssxJmcA0SyCzQjFPE=
X-Received: by 2002:a17:907:7ea5:b0:ae0:da2d:1a53 with SMTP id
 a640c23a62f3a-af619415d4cmr707859266b.42.1753540488978; Sat, 26 Jul 2025
 07:34:48 -0700 (PDT)
Precedence: bulk
X-Mailing-List: git@vger.kernel.org
List-Id: <git.vger.kernel.org>
List-Subscribe: <mailto:git+subscribe@vger.kernel.org>
List-Unsubscribe: <mailto:git+unsubscribe@vger.kernel.org>
MIME-Version: 1.0
References: <xmqqcya63cqx.fsf@gitster.g> <20250721115519.140361-1-usmanakinyemi202@gmail.com>
 <20250721115519.140361-2-usmanakinyemi202@gmail.com>
In-Reply-To: <20250721115519.140361-2-usmanakinyemi202@gmail.com>
From: "D. Ben Knoble" <ben.knoble@gmail.com>
Date: Sat, 26 Jul 2025 10:34:37 -0400
X-Gm-Features: Ac12FXyRVQ3_ypFCDP9TSEJTRRNNXIgAuZsUBsyTxQbHf5kAy79qgoPSs-riK3A
Message-ID: <CALnO6CCN0HUXJVYmvAJO3EoQQZzHVjE0P=g+AUc9c5Ti0Rcm2w@mail.gmail.com>
Subject: Re: [PATCH v4 1/2] t/t1517: automate `git subcmd -h` tests outside a repository
To: Usman Akinyemi <usmanakinyemi202@gmail.com>
Cc: git@vger.kernel.org, gitster@pobox.com, chriscool@tuxfamily.org, 
	christian.couder@gmail.com, me@ttaylorr.com, ps@pks.im
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

On Mon, Jul 21, 2025 at 7:55=E2=80=AFAM Usman Akinyemi
<usmanakinyemi202@gmail.com> wrote:
>
> Replace manual `-h` tests with a loop over all subcommands using
> `git --list-cmds=3Dmain`. This ensures consistent coverage of `-h`
> behavior outside a repo and future-proofs the test by covering
> new commands automatically.
>
> Known exceptions are skipped or marked as expected failures.
>
> Suggested-by: Patrick Steinhardt <ps@pks.im>
> Helped-by: Junio C Hamano <gitster@pobox.com>
> Signed-off-by: Usman Akinyemi <usmanakinyemi202@gmail.com>
> ---
>  t/t1517-outside-repo.sh | 25 +++++++++++++++++++++++--
>  1 file changed, 23 insertions(+), 2 deletions(-)
>
> diff --git a/t/t1517-outside-repo.sh b/t/t1517-outside-repo.sh
> index 6824581317..9fcebb7d94 100755
> --- a/t/t1517-outside-repo.sh
> +++ b/t/t1517-outside-repo.sh
> @@ -110,8 +110,29 @@ test_expect_success LIBCURL 'remote-http outside rep=
ository' '
>  test_expect_success 'update-server-info does not crash with -h' '
>         test_expect_code 129 git update-server-info -h >usage &&
>         test_grep "[Uu]sage: git update-server-info " usage &&
> -       test_expect_code 129 nongit git update-server-info -h >usage &&
> -       test_grep "[Uu]sage: git update-server-info " usage
>  '
>
> +for cmd in $(git --list-cmds=3Dmain)
> +do
> +       cmd=3D${cmd%.*} # strip .sh, .perl, etc.
> +       case "$cmd" in
> +       archimport | cvsexportcommit | cvsimport | cvsserver | daemon | \
> +       difftool--helper | filter-branch | fsck-objects | get-tar-commit-=
id | \
> +       http-backend | http-fetch | http-push | init-db | instaweb.sh | \
> +       merge-octopus | merge-one-file | merge-resolve | mergetool | \
> +       mktag | p4 | p4.py | pickaxe | quiltimport | remote-ftp | remote-=
ftps | \

Hm=E2=80=94if we strip the suffix with ${cmd%.*}, do we need a p4.py patter=
n
too? Actually, at first I wondered why we need to strip the suffix at
all. My local Git produces only unsuffixed commands. But
bin-wrappers/git produces both p4 and p4.py; request-pull and
request-pull.sh; and several others. So I think stripping is probably
right, just drop the .py pattern.

> +       remote-http | remote-https | replay | request-pull | send-email |=
 \
> +       sh-i18n--envsubst | shell | show | stage | submodule | svn | \
> +       upload-archive--writer | upload-pack | web--browse | whatchanged)
> +               expect_outcome=3Dexpect_failure ;;
> +       *)
> +               expect_outcome=3Dexpect_success ;;
> +       esac
> +       test_$expect_outcome "'git $cmd -h' outside a repository" '
> +               test_expect_code 129 nongit git $cmd -h >usage &&
> +               echo "Hello" &&

Woops! While basing some work on this branch, I spotted this "echo"=E2=80=
=94I
assume it's leftover and didn't mean to be included here? Will drop
locally for my own work.

> +               test_grep "[Uu]sage: git $cmd " usage
> +       '
> +done
> +
>  test_done
> --
> 2.50.0
>
>

Last thing: outside the patch context, there's a test for prune that
should probably get tweaked like the update-server-info test.


--=20
D. Ben Knoble

From mboxrd@z Thu Jan  1 00:00:00 1970
Received: from mail-ej1-f43.google.com (mail-ej1-f43.google.com [209.85.218.43])
	(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
	(No client certificate requested)
	by smtp.subspace.kernel.org (Postfix) with ESMTPS id 74BD5145348
	for <git@vger.kernel.org>; Sat, 26 Jul 2025 14:37:47 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.218.43
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
	t=1753540669; cv=none; b=hPyEnseSVhLDjzzqavholHTSFF/TGR3iW6giPqMjl1b2npbE7tKZKnjb54+tV0tOmxbOVMOCfJCWmx0kG0fFB87PTavDAwfUtYz6JyI44yv0tp5VLeIIV6XqqSgx6qWyH5JGhOX7l/KrLjhClfd0uSsQvceeIRozk1BrvWNFSHQ=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
	s=arc-20240116; t=1753540669; c=relaxed/simple;
	bh=FvWLZv9gRcB7FWMAx2rDOSIGFGavGlTy5DW038J3IGg=;
	h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject:
	 To:Cc:Content-Type; b=KmXC4mIdUL9tE/Q8PT8IXgyW+DBWlw0bEn1c+PuHh/2N892FXC0DhS76G5djW0XAX4ty0FXU9qmyDIoY+JTJCVezePYPqLMsucE4zTm2c3qgIrR2gjwaT8bp+zphEIEfX3G6tzeEeTnjO1YhnxIakEpSWdAX8SzfjyjOoKIO1FI=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=nEQvJIf9; arc=none smtp.client-ip=209.85.218.43
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.b="nEQvJIf9"
Received: by mail-ej1-f43.google.com with SMTP id a640c23a62f3a-ae3cd8fdd77so628556266b.1
        for <git@vger.kernel.org>; Sat, 26 Jul 2025 07:37:47 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=20230601; t=1753540666; x=1754145466; darn=vger.kernel.org;
        h=content-transfer-encoding:cc:to:subject:message-id:date:from
         :in-reply-to:references:mime-version:from:to:cc:subject:date
         :message-id:reply-to;
        bh=PWd02SU3sKYFP7Y1xzljaLtGvCFl6MPPMXAv4BnI7mI=;
        b=nEQvJIf9ENXc1p8IdF9oefgnS+y0EgmPMGO2qq1TRB9l8a9i94r9a97sUX5QoHOjiI
         Tern0p3+o5ye9EEktE6Wjcn25uauNpycYII/WDrFwqvkkLhWw3wYyNTE+F99492PSJsM
         WYbxu8pHPX/ZZ/4H4Y2YiMcb4R5LppZDPXPnTg/9xQeVM/Fbmfk85/knePb2zweEvS1s
         /t0/tFIaXiwQuPcbRizb6ZQ5yGRiyv9usZGHRMWeAwRYBIg8UxdopZrv1YGsRgI5by7/
         Jllx+fT6aHa7LTXWW+XBRywUTcmPc1KkZDVdQ5n2BDyGtWIvp3d+ZSdF4zj1XWeKgmDZ
         S2Zg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20230601; t=1753540666; x=1754145466;
        h=content-transfer-encoding:cc:to:subject:message-id:date:from
         :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc
         :subject:date:message-id:reply-to;
        bh=PWd02SU3sKYFP7Y1xzljaLtGvCFl6MPPMXAv4BnI7mI=;
        b=BhwCV4WzmtSiv3p4BkuHHCqORaKYHg0xwf0ip+zyjnVQwxiznjW+c03RC2PVpzf4ZS
         3tgOd3n7dP+04qZI3JZArCFceXg0mzgRqDwYC2iL6uYXCUgS4IVjrhK1wEta/mqE5hjf
         4OIfObwYq+zuySh4VhejxwbWWNUQF7DOxY3iA7OGpO58VuujxYGFN1P7zpHCfGhuY1tA
         QzrvaRoS9L0TasN87BP4WLWkI/ymkmneWFl2oruVLAUyu+Sx0oWY0NjrwqCJS1mGxJJL
         vWblZgRhjs5pWpcF5rPdoSKbck5vP1ZR7hirPxoc3SUMzzRB1ZQ86r0wQNo3LFs9TQta
         CFEg==
X-Gm-Message-State: AOJu0YydSkI7+Ez02FH8PHkLCJPthuid96LvFgnk1OCEyrX4fZRYkG8N
	SV0F9zP2kp27hod17lKXzsX581lkekS1qMNPg1vdIeC0WUTftACm8GLFCX53KYYEa6PWJc7jw6Y
	PJe/3AaCcSLBrWIpOHO8ZeAz95tdYZUM=
X-Gm-Gg: ASbGnctb7tFuTHqX4enl3R//Tbr6IucNr9hsL6Ts4wpdna2C6ycUYHJsSNh7CD3EmSH
	QjzmN+7POZzfPDqW7YittOplI52d16JQ2jywVdaM2vnKWC7HVZgRzGSNhewsOFaIR3urppRBDcF
	ZERGn4RPZd3FFwCQc4MZ0KZ2Mw4eghxDL1YaG0MdTiGI+8XWqW8RG6iQTqaG3g1fd7yrH4mXbsy
	//O405LuNC2jdR0FAso+rPauHk56CXNocyRu9j7JTuO6ys0wzJ+
X-Google-Smtp-Source: AGHT+IE4cWTfwbB2SgUuSjAJszjE9HicJk97oc8rYDbpkyRdc6IPpu27C4dUJEd+XGlOS5paK1q6Hkd4V0aurHnCDUU=
X-Received: by 2002:a17:907:728e:b0:ae6:abe9:4daa with SMTP id
 a640c23a62f3a-af61cd9e837mr680741166b.27.1753540665247; Sat, 26 Jul 2025
 07:37:45 -0700 (PDT)
Precedence: bulk
X-Mailing-List: git@vger.kernel.org
List-Id: <git.vger.kernel.org>
List-Subscribe: <mailto:git+subscribe@vger.kernel.org>
List-Unsubscribe: <mailto:git+unsubscribe@vger.kernel.org>
MIME-Version: 1.0
References: <xmqqcya63cqx.fsf@gitster.g> <20250721115519.140361-1-usmanakinyemi202@gmail.com>
 <20250721115519.140361-2-usmanakinyemi202@gmail.com>
In-Reply-To: <20250721115519.140361-2-usmanakinyemi202@gmail.com>
From: "D. Ben Knoble" <ben.knoble@gmail.com>
Date: Sat, 26 Jul 2025 10:37:33 -0400
X-Gm-Features: Ac12FXyUCkwx35jZaFrRUDUWUOsv24UfMfSvaWzSY_9Z42x1fJUtIKhUdP3UDnI
Message-ID: <CALnO6CCFXfPDZKzx1SBufwzkBJchZr0XYigo_8AQ_U=MuJa7xg@mail.gmail.com>
Subject: Re: [PATCH v4 1/2] t/t1517: automate `git subcmd -h` tests outside a repository
To: Usman Akinyemi <usmanakinyemi202@gmail.com>
Cc: git@vger.kernel.org, gitster@pobox.com, chriscool@tuxfamily.org, 
	christian.couder@gmail.com, me@ttaylorr.com, ps@pks.im
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

On Mon, Jul 21, 2025 at 7:55=E2=80=AFAM Usman Akinyemi
<usmanakinyemi202@gmail.com> wrote:
>
> Replace manual `-h` tests with a loop over all subcommands using
> `git --list-cmds=3Dmain`. This ensures consistent coverage of `-h`
> behavior outside a repo and future-proofs the test by covering
> new commands automatically.
>
> Known exceptions are skipped or marked as expected failures.
>
> Suggested-by: Patrick Steinhardt <ps@pks.im>
> Helped-by: Junio C Hamano <gitster@pobox.com>
> Signed-off-by: Usman Akinyemi <usmanakinyemi202@gmail.com>
> ---
>  t/t1517-outside-repo.sh | 25 +++++++++++++++++++++++--
>  1 file changed, 23 insertions(+), 2 deletions(-)
>
> diff --git a/t/t1517-outside-repo.sh b/t/t1517-outside-repo.sh
> index 6824581317..9fcebb7d94 100755
> --- a/t/t1517-outside-repo.sh
> +++ b/t/t1517-outside-repo.sh
> @@ -110,8 +110,29 @@ test_expect_success LIBCURL 'remote-http outside rep=
ository' '
>  test_expect_success 'update-server-info does not crash with -h' '
>         test_expect_code 129 git update-server-info -h >usage &&
>         test_grep "[Uu]sage: git update-server-info " usage &&
> -       test_expect_code 129 nongit git update-server-info -h >usage &&
> -       test_grep "[Uu]sage: git update-server-info " usage
>  '
>
> +for cmd in $(git --list-cmds=3Dmain)
> +do
> +       cmd=3D${cmd%.*} # strip .sh, .perl, etc.
> +       case "$cmd" in
> +       archimport | cvsexportcommit | cvsimport | cvsserver | daemon | \
> +       difftool--helper | filter-branch | fsck-objects | get-tar-commit-=
id | \
> +       http-backend | http-fetch | http-push | init-db | instaweb.sh | \
> +       merge-octopus | merge-one-file | merge-resolve | mergetool | \
> +       mktag | p4 | p4.py | pickaxe | quiltimport | remote-ftp | remote-=
ftps | \
> +       remote-http | remote-https | replay | request-pull | send-email |=
 \
> +       sh-i18n--envsubst | shell | show | stage | submodule | svn | \
> +       upload-archive--writer | upload-pack | web--browse | whatchanged)

Sorry, one more thing: I spot-checked a few of these, and it seems the
main issue that causes failures is the exit code; they seem to work
with "-h" outside a repo. Out of scope for this series, but something
worth tidying up as #leftoverbits ?

> +               expect_outcome=3Dexpect_failure ;;
> +       *)
> +               expect_outcome=3Dexpect_success ;;
> +       esac
> +       test_$expect_outcome "'git $cmd -h' outside a repository" '
> +               test_expect_code 129 nongit git $cmd -h >usage &&
> +               echo "Hello" &&
> +               test_grep "[Uu]sage: git $cmd " usage
> +       '
> +done
> +
>  test_done
> --
> 2.50.0
>
>


--=20
D. Ben Knoble

From mboxrd@z Thu Jan  1 00:00:00 1970
Received: from mail-ej1-f54.google.com (mail-ej1-f54.google.com [209.85.218.54])
	(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
	(No client certificate requested)
	by smtp.subspace.kernel.org (Postfix) with ESMTPS id 692671DE4FB
	for <git@vger.kernel.org>; Sat, 26 Jul 2025 14:52:13 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.218.54
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
	t=1753541535; cv=none; b=Kgokq6JzRma3u7HT4G0Amm5xwIfRPVvHfKQBfMHS88zk1/s8gOjJe11Ah3NyQ/3Tjz8Z7lPNNiKDFI0+YoKAoWaYS40VgHTIgZbM8CdNiqyz/hCIXkM+UiLVNn08xJYhSEhWJA81i8lnlxssKNn11cj2xshege/BMoHg0Z1Yx0M=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
	s=arc-20240116; t=1753541535; c=relaxed/simple;
	bh=IXDPYcLRaAed9+Wig6D2+lWLjE2tvKKmblLo8j4T3XI=;
	h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject:
	 To:Cc:Content-Type; b=S9w+VHJXHrp8XaKKIGw2R23DgjE5X/WX9+YOklcNiaphbJf+8m97yfqwsiFXWQD5WH0Govq/Iqs9o0TORHseZMeoXxcAlcRe4uhVfp/YjzWL/3O7j4ehIbX81j3p+0ZRSTeeXthzd6nPx0WL0xj7Hy95gtmfv7Yz/JkCuchvmjs=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=YpQTJ42h; arc=none smtp.client-ip=209.85.218.54
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.b="YpQTJ42h"
Received: by mail-ej1-f54.google.com with SMTP id a640c23a62f3a-ae3be3eabd8so646860166b.1
        for <git@vger.kernel.org>; Sat, 26 Jul 2025 07:52:13 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=20230601; t=1753541532; x=1754146332; darn=vger.kernel.org;
        h=content-transfer-encoding:cc:to:subject:message-id:date:from
         :in-reply-to:references:mime-version:from:to:cc:subject:date
         :message-id:reply-to;
        bh=+Z3aiiPn1ysU1MfRifH9NqV7w6Dyvdz0qRA/6TlQaf0=;
        b=YpQTJ42hmQ3sQFz29fsmfk/dT+G2LqXAEx2vyb60KV7exChRwwfslXu9bJTpTXnUA3
         AAKC5QQ0PKO9AAjr8arxnr2BzT6fKZ9PvUoysh0tYGaGHlH8Huv33p+Tr/dyjdVFyjJV
         E8Zi4mPgvWL8xTZh2BjpVU94/h3hVLn0lNyVQuixUcW5DcRXMjj75r203MqVO6dwKrNA
         wEIwl5b6zT7+PMuMA8UPLW5ZA8OMSCkfA7xQnCVzLCZlzsJ37sAXoabkoErYwvpCLrC7
         qKGbnGgZZ+gpmHPszPATNGHY0Vn/UYkIVyzn/CgVgwBKiFES6IEKsQ4qx2rzWALPvUn0
         Dizw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20230601; t=1753541532; x=1754146332;
        h=content-transfer-encoding:cc:to:subject:message-id:date:from
         :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc
         :subject:date:message-id:reply-to;
        bh=+Z3aiiPn1ysU1MfRifH9NqV7w6Dyvdz0qRA/6TlQaf0=;
        b=BRnZR/YNBHjPPMLwRxBSpnENYvBeoL5hrfkac80HJCQ6sc9IPkD48LOyG6E/hyU+Q+
         pm99iGEqh+BOGJbH9i8APt7RJIcFNnBhj6cbwzxnaDdWmbAijYrjzNCW8WA7bwyBYyUU
         3goz0Vd94H3dJ7fRh8F/RobygcWnZRyQDHU0H+E6TCu5HBr7pXJXrrVcyFR4N065u+g4
         vGMQM+WFgb2aVXklqroFUlyhx1qg53GFshjDR4w79j6md4aGPXpUnuUPzUtQySucvUNd
         2EAFBOUJCtWpLTTKaFk9BCnm+76vTrUQxwNFT95ZIq+7SMV7LYin/dySUzQlSQTRDHnP
         9kNg==
X-Gm-Message-State: AOJu0Yzoo2FlSQdvOS7numwvp8r3SvoI313nMBX4Y0+xa4T3rQyuyB9Y
	mfbn0oHy1et7wHfnZBph1KENXqC6/VCTCB+er31URN7c8cdq3yFE+QjciOzJ3BJYjlD0ZahfahO
	gBm0kp6wAX3JvBUiokvDDAOYMiAyzlu8xUL3e
X-Gm-Gg: ASbGnctx9gC6U9tAs0vg9eEj4OW43rCUcMPJCojNr5NxX5/yFN5jzoUsW6x1UgudLki
	1rYaAlyXlllGfFTx/713ydgpk09UcyM5qgLe8gbMbKnrnkqKLsdDf8eiC55y61Cf3AVdAKF4wE3
	Nwi5StOSgee3h3L1VkUnVcNvLN5BClGGEtYbvyTh34Z3td57bml3LB3sBxWhNw5HvcQoTGIyeJn
	xjVZR10gjLQrBw5yYxlxKWGceSUiLJU7kY7AxkeHw==
X-Google-Smtp-Source: AGHT+IHOyhcPgBxnpCmD7w95uaVbprdBUnyJN4/m/eHBSQ1jvg4PXQEAlYWAsVAxrpbv/ylCW7fw7zcDyUZzLamvBqY=
X-Received: by 2002:a17:906:fe0c:b0:ad8:adf3:7d6d with SMTP id
 a640c23a62f3a-af61e533d5amr602352466b.21.1753541531569; Sat, 26 Jul 2025
 07:52:11 -0700 (PDT)
Precedence: bulk
X-Mailing-List: git@vger.kernel.org
List-Id: <git.vger.kernel.org>
List-Subscribe: <mailto:git+subscribe@vger.kernel.org>
List-Unsubscribe: <mailto:git+unsubscribe@vger.kernel.org>
MIME-Version: 1.0
References: <xmqqcya63cqx.fsf@gitster.g> <20250721115519.140361-1-usmanakinyemi202@gmail.com>
 <20250721115519.140361-2-usmanakinyemi202@gmail.com> <CALnO6CCFXfPDZKzx1SBufwzkBJchZr0XYigo_8AQ_U=MuJa7xg@mail.gmail.com>
In-Reply-To: <CALnO6CCFXfPDZKzx1SBufwzkBJchZr0XYigo_8AQ_U=MuJa7xg@mail.gmail.com>
From: "D. Ben Knoble" <ben.knoble@gmail.com>
Date: Sat, 26 Jul 2025 10:52:00 -0400
X-Gm-Features: Ac12FXzV4oIVShB-D5F8LDLn3o6IL8cTuuSJ-jzGWmLsiXSMzttqXvFvfqQ3IO0
Message-ID: <CALnO6CCxTQYnVmdjeDnCyr=9i9S-uP9QbF9X0dUTfeJ4mcX4ig@mail.gmail.com>
Subject: Re: [PATCH v4 1/2] t/t1517: automate `git subcmd -h` tests outside a repository
To: Usman Akinyemi <usmanakinyemi202@gmail.com>
Cc: git@vger.kernel.org, gitster@pobox.com, chriscool@tuxfamily.org, 
	christian.couder@gmail.com, me@ttaylorr.com, ps@pks.im
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

On Sat, Jul 26, 2025 at 10:37=E2=80=AFAM D. Ben Knoble <ben.knoble@gmail.co=
m> wrote:
>
> On Mon, Jul 21, 2025 at 7:55=E2=80=AFAM Usman Akinyemi
> <usmanakinyemi202@gmail.com> wrote:
> >
> > Replace manual `-h` tests with a loop over all subcommands using
> > `git --list-cmds=3Dmain`. This ensures consistent coverage of `-h`
> > behavior outside a repo and future-proofs the test by covering
> > new commands automatically.
> >
> > Known exceptions are skipped or marked as expected failures.
> >
> > Suggested-by: Patrick Steinhardt <ps@pks.im>
> > Helped-by: Junio C Hamano <gitster@pobox.com>
> > Signed-off-by: Usman Akinyemi <usmanakinyemi202@gmail.com>
> > ---
> >  t/t1517-outside-repo.sh | 25 +++++++++++++++++++++++--
> >  1 file changed, 23 insertions(+), 2 deletions(-)
> >
> > diff --git a/t/t1517-outside-repo.sh b/t/t1517-outside-repo.sh
> > index 6824581317..9fcebb7d94 100755
> > --- a/t/t1517-outside-repo.sh
> > +++ b/t/t1517-outside-repo.sh
> > @@ -110,8 +110,29 @@ test_expect_success LIBCURL 'remote-http outside r=
epository' '
> >  test_expect_success 'update-server-info does not crash with -h' '
> >         test_expect_code 129 git update-server-info -h >usage &&
> >         test_grep "[Uu]sage: git update-server-info " usage &&
> > -       test_expect_code 129 nongit git update-server-info -h >usage &&
> > -       test_grep "[Uu]sage: git update-server-info " usage
> >  '
> >
> > +for cmd in $(git --list-cmds=3Dmain)
> > +do
> > +       cmd=3D${cmd%.*} # strip .sh, .perl, etc.
> > +       case "$cmd" in
> > +       archimport | cvsexportcommit | cvsimport | cvsserver | daemon |=
 \
> > +       difftool--helper | filter-branch | fsck-objects | get-tar-commi=
t-id | \
> > +       http-backend | http-fetch | http-push | init-db | instaweb.sh |=
 \
> > +       merge-octopus | merge-one-file | merge-resolve | mergetool | \
> > +       mktag | p4 | p4.py | pickaxe | quiltimport | remote-ftp | remot=
e-ftps | \
> > +       remote-http | remote-https | replay | request-pull | send-email=
 | \
> > +       sh-i18n--envsubst | shell | show | stage | submodule | svn | \
> > +       upload-archive--writer | upload-pack | web--browse | whatchange=
d)
>
> Sorry, one more thing: I spot-checked a few of these, and it seems the
> main issue that causes failures is the exit code; they seem to work
> with "-h" outside a repo. Out of scope for this series, but something
> worth tidying up as #leftoverbits ?

It turns out a few pass for me right now: quiltimport and request-pull
both work just fine.

--=20
D. Ben Knoble

From mboxrd@z Thu Jan  1 00:00:00 1970
Received: from mail-ej1-f44.google.com (mail-ej1-f44.google.com [209.85.218.44])
	(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
	(No client certificate requested)
	by smtp.subspace.kernel.org (Postfix) with ESMTPS id E90D419309E
	for <git@vger.kernel.org>; Sat, 26 Jul 2025 16:02:51 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.218.44
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
	t=1753545773; cv=none; b=cOwu+4SQoqfZqH3T+Zg/oRkgIdq1vZV8Gk54UZRRoByV80MAIeDFgMkHXbuqgeU3WCXmJQw+FZYeC8nQBn5Acjb9ALC5TIwcTw+lcKNbN/K/xdG7nuFMq1eHWhz9NwF0zZMU4KBLkvWipqv8+TIl+fwG/1O9WJ15q/61w/kTCFg=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
	s=arc-20240116; t=1753545773; c=relaxed/simple;
	bh=LjW7FjYYHgr/6wncLjOhDKdAX5l/UtwVROq7wBV5XGw=;
	h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject:
	 To:Cc:Content-Type; b=QGRsohO6wrjOKTqrW5X9l309pSX7mvq+trv2ZjDbDq7c2PrBcqJVcDmlb87LsJHz8bMEaVIXJxpmzCQffz/wbHU4zKxI3XqVJ3qaLWZekvymrvTZqkb4QDKLF1skQBLCyv4b3UMyX/1ojZnf7F/LY3+n8wZ4tBQkELjg+s9dB8A=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=ThS+qaHZ; arc=none smtp.client-ip=209.85.218.44
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.b="ThS+qaHZ"
Received: by mail-ej1-f44.google.com with SMTP id a640c23a62f3a-ae6f8d3bcd4so594127766b.1
        for <git@vger.kernel.org>; Sat, 26 Jul 2025 09:02:51 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=20230601; t=1753545770; x=1754150570; darn=vger.kernel.org;
        h=content-transfer-encoding:cc:to:subject:message-id:date:from
         :in-reply-to:references:mime-version:from:to:cc:subject:date
         :message-id:reply-to;
        bh=sNCREAr84JqHeQ9VFqyAsJTmdox1BaRMr1/vu4+yjsM=;
        b=ThS+qaHZIaFAOEP/gffrwZRFpMt9pb3teUYmXQ99VlqWYo/Mdch1jRtGtve5Vlfpdm
         dz7xWy7m2lYNsxDzNrPI5Z+wsdVyVbbiQaA4pg6E8xRk1de59t+x5JRQD5saTJgbnWfv
         Sz0T/LqyGbhju6WED9Ct5USmQqrYW+p8HbbS/mrE0j0JmblFhEdc+oYBfZnlamvgQEAP
         nlDr80J2DgU1/XuMwcmrKxAzG9AGI8nK6tHKZUVJj8efdWMpUJNjB03USHW/Si1OklMr
         qC/lJFv+yxiUfvIbvPAche9rNTBsfwusAygCubjBlgknt9wFhkdaTzcFsfzlyu/HkNJW
         6C/w==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20230601; t=1753545770; x=1754150570;
        h=content-transfer-encoding:cc:to:subject:message-id:date:from
         :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc
         :subject:date:message-id:reply-to;
        bh=sNCREAr84JqHeQ9VFqyAsJTmdox1BaRMr1/vu4+yjsM=;
        b=CG8P9+WKnyMdnN0bXSa83bJHrbAFGR3mWNL13C6LAfMUsILnETSdu6QQfHprIsekqf
         u/cShe0sLgU2YKkh1tUDxALuDXg3u+bx2uPJWvbzmilpnFwCpJukf0s4M2rXmzqMdbAJ
         a8RBuNYDbNVXj4WIXD0wgo0xWi87wxEder4Tzs2nZ3cspALMRSFJ8QcACy30sLEpTD4t
         5OqRmU1F9YdezYSgP5Air+XYbcN0jSTVnEYHrvMBlr0mkTHP1mFwiPwiM0UYpgtH5dvP
         1nq1NCybHamA3sJye2Ze+wftcb3a3G+ULLvMvxx1AWnXsTeavM10W6C8+njci2ai3OVk
         3NAg==
X-Gm-Message-State: AOJu0YxTVkJF19AwKoM9o+5uZXvaKc9+ffN8Z/h5JseS4iC87NGEqDl3
	/ELhSHIwZQJJDUUaLRfkxy8iFmJPyvVu65H1lZ4QMq9zLWiPGN115ZEu+L6TnnodZ2GbT+Alb7X
	D5CjwzSR62VrCHymxS8nEo2ojT39f5X4=
X-Gm-Gg: ASbGncssqMnKoBuiKJBm6R1LTfE8wQ5pAJgreE9d3p3Rj16ZO3Ac9nLFS6naYQNbkSE
	GEOEb80qdYagUm1Bdsq1YDkyraV83pT34YSHUA9tI8+27ISkkqcdzJoziUrQPQq2HnV/CUVYVxa
	rrKn4nIC9f49A0+YVTxeC5+67h9dzkktHsRIjMF+RHFHPDk8rNyzyzoPAduq1XbbLtPh+4IK2S4
	mxX2KPR8JNWaJ/6km5UXMbaG68aKe7ogvJ7dOCtZA==
X-Google-Smtp-Source: AGHT+IG/xR+ldm6SZZzLVsxWNAStaA7tc2h5y6vu6oX6uz5p6zwIRDnrsYiLoYZLrCl93jyYW61/wBtRZZilNuId1e0=
X-Received: by 2002:a17:906:7315:b0:aec:4f33:e7db with SMTP id
 a640c23a62f3a-af61a0ef054mr715237166b.56.1753545770000; Sat, 26 Jul 2025
 09:02:50 -0700 (PDT)
Precedence: bulk
X-Mailing-List: git@vger.kernel.org
List-Id: <git.vger.kernel.org>
List-Subscribe: <mailto:git+subscribe@vger.kernel.org>
List-Unsubscribe: <mailto:git+unsubscribe@vger.kernel.org>
MIME-Version: 1.0
References: <xmqqcya63cqx.fsf@gitster.g> <20250721115519.140361-1-usmanakinyemi202@gmail.com>
 <20250721115519.140361-3-usmanakinyemi202@gmail.com>
In-Reply-To: <20250721115519.140361-3-usmanakinyemi202@gmail.com>
From: "D. Ben Knoble" <ben.knoble@gmail.com>
Date: Sat, 26 Jul 2025 12:02:38 -0400
X-Gm-Features: Ac12FXydYrYEkiY7UyIT_sG9QN9vb37HeQ82uaUE3iIaoWLg8PQtxQY8wg8oI4s
Message-ID: <CALnO6CDvwbMK_GRdLOBFVdW1XZ5JTuB+Uo5JVPY3Pw_noNBYzA@mail.gmail.com>
Subject: Re: [PATCH v4 2/2] t5200: move `update-server-info -h` test from t1517
To: Usman Akinyemi <usmanakinyemi202@gmail.com>
Cc: git@vger.kernel.org, gitster@pobox.com, chriscool@tuxfamily.org, 
	christian.couder@gmail.com, me@ttaylorr.com, ps@pks.im
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

On Mon, Jul 21, 2025 at 7:55=E2=80=AFAM Usman Akinyemi
<usmanakinyemi202@gmail.com> wrote:
>
> t1517 is now focused on testing subcommands outside a repository.
> Move the in-repo `-h` test for `update-server-info` to t5200,
> which covers this command.
>
> Suggested-by: Patrick Steinhardt <ps@pks.im>
> Helped-by: Junio C Hamano <gitster@pobox.com>
> Signed-off-by: Usman Akinyemi <usmanakinyemi202@gmail.com>
> ---
>  t/t1517-outside-repo.sh       | 5 -----
>  t/t5200-update-server-info.sh | 5 +++++
>  2 files changed, 5 insertions(+), 5 deletions(-)
>
> diff --git a/t/t1517-outside-repo.sh b/t/t1517-outside-repo.sh
> index 9fcebb7d94..a1c644dffa 100755
> --- a/t/t1517-outside-repo.sh
> +++ b/t/t1517-outside-repo.sh
> @@ -107,11 +107,6 @@ test_expect_success LIBCURL 'remote-http outside rep=
ository' '
>         test_grep "^error: remote-curl" actual
>  '
>
> -test_expect_success 'update-server-info does not crash with -h' '
> -       test_expect_code 129 git update-server-info -h >usage &&
> -       test_grep "[Uu]sage: git update-server-info " usage &&
> -'
> -
>  for cmd in $(git --list-cmds=3Dmain)
>  do
>         cmd=3D${cmd%.*} # strip .sh, .perl, etc.
> diff --git a/t/t5200-update-server-info.sh b/t/t5200-update-server-info.s=
h
> index 8365907055..a1f129db4e 100755
> --- a/t/t5200-update-server-info.sh
> +++ b/t/t5200-update-server-info.sh
> @@ -46,4 +46,9 @@ test_expect_success 'midx does not create duplicate pac=
k entries' '
>         test_must_be_empty dups
>  '
>
> +test_expect_success 'update-server-info does not crash with -h' '
> +       test_expect_code 129 git update-server-info -h >usage &&
> +       test_grep "[Uu]sage: git update-server-info " usage &&

One other fix I needed locally: in neither the preimage nor postimage
should this have a trailing "&&"

> +'
> +
>  test_done
> --
> 2.50.0
>
>


--=20
D. Ben Knoble

From mboxrd@z Thu Jan  1 00:00:00 1970
Received: from mail-vs1-f54.google.com (mail-vs1-f54.google.com [209.85.217.54])
	(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
	(No client certificate requested)
	by smtp.subspace.kernel.org (Postfix) with ESMTPS id 842B621A424
	for <git@vger.kernel.org>; Sat, 26 Jul 2025 21:51:18 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.217.54
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
	t=1753566680; cv=none; b=oFTAXa4WGGQ17vbfiaSEihPQh8hZrkdAvjCMYVg6jW2EVrEy78Gr+SHE5oguPPksrgquKE1XCVQsEQjW0dDEMvJLl4hZRZlyV95v4XFBFzH58YK5akqX1nUeVejjrKk8Ce6UyvUI9yx3suJyO7p0w4Qa+i5LCFXW1KPchs/4tgM=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
	s=arc-20240116; t=1753566680; c=relaxed/simple;
	bh=NHDaxn0QdbREMaVltEijFfuLoJIf7UvOAUfLYFEx0Gk=;
	h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject:
	 To:Cc:Content-Type; b=Xul5q9moZwLQMUrct2ogrWFElt/6ITRPhy2verqEBPE+Wu2kBY2eazuwJtdKb8TOVr7/FN9ohN/1gCyglT3fPEjtzZyNKOCmz0qKwEqpXOm2IQXrgFDecKu3QKtrnhpH6RdR2wvCipStl/UptS1L5gYd3XX89s+8dIkUuSsbuBQ=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=WgPmFq2e; arc=none smtp.client-ip=209.85.217.54
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.b="WgPmFq2e"
Received: by mail-vs1-f54.google.com with SMTP id ada2fe7eead31-4e9c689d538so780720137.0
        for <git@vger.kernel.org>; Sat, 26 Jul 2025 14:51:18 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=20230601; t=1753566677; x=1754171477; darn=vger.kernel.org;
        h=cc:to:subject:message-id:date:from:in-reply-to:references
         :mime-version:from:to:cc:subject:date:message-id:reply-to;
        bh=uXC4rHJGvutbxHJzRMxUwFAriS1dLdSVo4M/vDJ56jI=;
        b=WgPmFq2ehRKZZV/+oPON59y8LFIC/gQStC7C7ZDt75E0EDwfj1yVT2UPPlqoIq2u4E
         MJqbe8zQmyOFsuccuTDP5b8zzmhB0hh98dGXSxZqlz0RaaA8eoy+Av36o28+BJg0h51f
         kcjQx/AoUTcrUrWkx048fzxQOsh+mz7lHHHa0B/EHr0INbkoGhvkeaosLbgEe+7deg34
         lk9vEC+pKdhASuP7HEFKpAZH28Y952BxDTwHAXRUQo+PqC9QogHNFLuR1eYCArtmu8t3
         FWUxNFzIIBHYYDLUuh63iytEW7J1an7f7PSTYeTy951zTLb9H6OuKhuN3NItpevdFVOn
         WMMg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20230601; t=1753566677; x=1754171477;
        h=cc:to:subject:message-id:date:from:in-reply-to:references
         :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id
         :reply-to;
        bh=uXC4rHJGvutbxHJzRMxUwFAriS1dLdSVo4M/vDJ56jI=;
        b=MYYFRhevp+fv6bOygip0hwTMg6trB/i+tbwAR4vk/FEUfeFNjDRxrzKDGcS+i5h7Vw
         8hOs0tnCc9tSWiGTM49g2w3kLlmJzs5za5yyzDyLrbvhxP20ns6SrAsQQqhPsBpAG2Tg
         dIrNi/lXWoQ4PMs2fzAsIgF4wYIYjhiU7v0//hwAN+0MUAi9dpkQHDNqUDjNvf8GUt4b
         g//Pg4s/YCHDp6+XJe77iyQMaXv0A4oh5Olu0NYbt57ZogjYLAKpvI6btFCEkZ9QX6H2
         sGZZoNGiS0M7sbAwglV9SJF/JehioffB6RjJ4snHKP+toi10MWuWCHBt/t00T+3n6DhH
         V56Q==
X-Gm-Message-State: AOJu0YyOb/hvfL7aY3clyW5UYmcZtb4vfp175T0HL9Vx2yWxSzWgl32F
	U92MBsKGt/T9RVXtPbSY7r4Gz0NgWXuIKhWzTiJ4FecyITyMjHAcffWBgM+7qVkL6CTppSAwfYS
	WnJJdwNHQc2d5kZMblH4vnHqWc4KDhf84jBX+Ow8=
X-Gm-Gg: ASbGncsZOj9lx6AUWp82XBwCSLUilRhJyIj3MFCRtlHwfkSS7kKUFF/JAGDDQ8spj+Q
	5EEETU8b8tH9jIjJQzBKyNeB4qoOl9MWZJiv1VqkqGATz0j6YrWytKDFVaKb+nA/NLePTLq8mKR
	I+Pgtzlu+OuG/I8HnxruQKuoaCH+yETPvEguRwUhHpG8dNlvnaVh8e2PGLW+td/oAff3JuepliU
	HQJ7rwMSeFSvpXv7A==
X-Google-Smtp-Source: AGHT+IG1bWhB4l+SmVzYXv9KBZpniwGjU4ds+G5jwWeAGJsJ/ssmojcgREneQSoUds+2fXPm3dwI4TG78KRyR5P8irk=
X-Received: by 2002:a05:6102:358d:b0:4eb:f8aa:9c36 with SMTP id
 ada2fe7eead31-4fa3fa5950dmr2144110137.4.1753566677459; Sat, 26 Jul 2025
 14:51:17 -0700 (PDT)
Precedence: bulk
X-Mailing-List: git@vger.kernel.org
List-Id: <git.vger.kernel.org>
List-Subscribe: <mailto:git+subscribe@vger.kernel.org>
List-Unsubscribe: <mailto:git+unsubscribe@vger.kernel.org>
MIME-Version: 1.0
References: <xmqqcya63cqx.fsf@gitster.g> <20250721115519.140361-1-usmanakinyemi202@gmail.com>
 <20250721115519.140361-2-usmanakinyemi202@gmail.com> <CALnO6CCFXfPDZKzx1SBufwzkBJchZr0XYigo_8AQ_U=MuJa7xg@mail.gmail.com>
In-Reply-To: <CALnO6CCFXfPDZKzx1SBufwzkBJchZr0XYigo_8AQ_U=MuJa7xg@mail.gmail.com>
From: Usman Akinyemi <usmanakinyemi202@gmail.com>
Date: Sun, 27 Jul 2025 03:21:06 +0530
X-Gm-Features: Ac12FXwf1_98EVzTfdJ8Pr66VXOMBiwGZJMmhVT0kYQLp99n6DJXm6fNeRNE2DU
Message-ID: <CAPSxiM_sP7MG5SDLe-_-FULhqmW10M=8Ssu3PMoZD8=rS6CkAA@mail.gmail.com>
Subject: Re: [PATCH v4 1/2] t/t1517: automate `git subcmd -h` tests outside a repository
To: "D. Ben Knoble" <ben.knoble@gmail.com>
Cc: git@vger.kernel.org, gitster@pobox.com, chriscool@tuxfamily.org, 
	christian.couder@gmail.com, me@ttaylorr.com, ps@pks.im
Content-Type: text/plain; charset="UTF-8"

> > +for cmd in $(git --list-cmds=main)
> > +do
> > +       cmd=${cmd%.*} # strip .sh, .perl, etc.
> > +       case "$cmd" in
> > +       archimport | cvsexportcommit | cvsimport | cvsserver | daemon | \
> > +       difftool--helper | filter-branch | fsck-objects | get-tar-commit-id | \
> > +       http-backend | http-fetch | http-push | init-db | instaweb.sh | \
> > +       merge-octopus | merge-one-file | merge-resolve | mergetool | \
> > +       mktag | p4 | p4.py | pickaxe | quiltimport | remote-ftp | remote-ftps | \
> > +       remote-http | remote-https | replay | request-pull | send-email | \
> > +       sh-i18n--envsubst | shell | show | stage | submodule | svn | \
> > +       upload-archive--writer | upload-pack | web--browse | whatchanged)
>
> Sorry, one more thing: I spot-checked a few of these, and it seems the
> main issue that causes failures is the exit code; they seem to work
> with "-h" outside a repo. Out of scope for this series, but something
> worth tidying up as #leftoverbits ?
>
You meant the exit code of 129 right ?

From mboxrd@z Thu Jan  1 00:00:00 1970
Received: from mail-vs1-f51.google.com (mail-vs1-f51.google.com [209.85.217.51])
	(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
	(No client certificate requested)
	by smtp.subspace.kernel.org (Postfix) with ESMTPS id 97D211DE885
	for <git@vger.kernel.org>; Sat, 26 Jul 2025 21:53:40 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.217.51
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
	t=1753566822; cv=none; b=kI4Ts3/R76B0cKJ2uXjr6JN2jYIYRp9y0P6Ankxs6dTtThkuTswrH+nHkOuj+eq3WB6VoJGAiGXRjX4vGpFc7qeqfOeGf33iKCfPapbzQsYG5i4dliQEVsm//UIKvDFjblUCyf8xsWLfBjfTj2R7a+jU0fbX+z69gyrwxYWz84c=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
	s=arc-20240116; t=1753566822; c=relaxed/simple;
	bh=eM1/NG7HtpthLBeGNUeUPWHcj9eows3kCocnyXLM87Q=;
	h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject:
	 To:Cc:Content-Type; b=J/xeMEuHHd3xGzPD8lnqVVmoLEYWs7axOI38Srvk7Yeu5fV8HDNtJQa/x+DmsXwjJI4+NQhNtov1WyViC1pucdcGwy9fo87+gH6EyEj8zVshygZTPUrFZ3fZXRvxMW5xTEOWaHXs8kDVFVAtXEU8KRb9WGMN75pnHax6PttKdAA=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=B4+5H2EN; arc=none smtp.client-ip=209.85.217.51
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.b="B4+5H2EN"
Received: by mail-vs1-f51.google.com with SMTP id ada2fe7eead31-4e80d19c7ebso2189133137.3
        for <git@vger.kernel.org>; Sat, 26 Jul 2025 14:53:40 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=20230601; t=1753566819; x=1754171619; darn=vger.kernel.org;
        h=content-transfer-encoding:cc:to:subject:message-id:date:from
         :in-reply-to:references:mime-version:from:to:cc:subject:date
         :message-id:reply-to;
        bh=rx08C7grtr/oVkurOLTthgMb6aRQn/Q2O6yyNrVd4q8=;
        b=B4+5H2EN10/IJvssx8rNrVZKmGNMl9AqdyP1fSA7QHcxZgV8AFS2SIETn4OqIx/N5H
         gixoH9d8AiAwIsc46w/0MV71GCmKrSecITpK3GQxF4mYb2ltASUmP7WyHOfmHP2MnFQA
         dJbkH714ihp4Xl7sc3PneXovH/gG5Z/7ERrrCYjcyccHfST7p5ea/oaIIU1g0nJOBtGb
         1PoBt9tjumjMIfjF5YZEZUIYcHQyETUxOEUfKQ9dLlbaSdlVydGZOnBEPbZ9bU4EUjnK
         9WB5/A8Io02/LFauOjigrYsQ2eswRDPEeko/83USAAfyCIuisCaFNQf7GnEbWbwkyAlU
         M8Iw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20230601; t=1753566819; x=1754171619;
        h=content-transfer-encoding:cc:to:subject:message-id:date:from
         :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc
         :subject:date:message-id:reply-to;
        bh=rx08C7grtr/oVkurOLTthgMb6aRQn/Q2O6yyNrVd4q8=;
        b=bcl3K9ztjDR0ONtc/iDdr4H6K3TzisuG9yo8Q0T3UiSYWnVPPJ+tjuZRYrRRzg2lSP
         3bv2jMD1lFsrP68n2Z19uihSpjQWNu/IUQjulXXu2qBs7EkkfxdDxPe9jW0wewdJHHE9
         BhqK61/s6w5ULNTVGHrvYsx9MriCCtrR1n9wlCjFNsHKV60z3cb+R1PyOuTNKtV6XvDw
         s+FxvSF5fjI9oYUrNQNz0qqbQCxYzsPw1yMEQRyauChY8Hcq51HxRXshGstBZbPaD5EJ
         i0kbpwlavzDr9f0cI63lWi9nIo7CkqEhqpkoU4XXqZ02j3w5qZsSs1ycW4W53Nq/2Da3
         fOvw==
X-Gm-Message-State: AOJu0YySPpDMupqVcg3hDzgWs5dx1/RLCDAZwqThemvWj1i0NKYM0f4x
	nW97ebG8GP+P3c0mVGRMCmp5WRiz4M33lMP3IBeFwipA0DHEbM1kqTqwjF515NeE/rpsMnLKtyQ
	B5lMjOUlzaaI69KJgB/SAIQxgMKYGbZNROpJzRCY=
X-Gm-Gg: ASbGncsvmml9gz3ecZDLi15sta640LyibLaJRwuh+w28VvxppXDsiORGwBLucpEN4zD
	mKJgEPl2B41oAcXUGJEnEJ5BHaGgi0I59TR592vPBU2wNOuP96vl40kWgGhuqEQ4Tt8I9+00554
	YtnLs8hD8YBZN1XXOEdzsrVtZ5WV2f664jNsZoKUZoRxmzjIUMAhre0Fx13b6Md4PR3BEaCdnax
	lhHWBQ=
X-Google-Smtp-Source: AGHT+IGWKns6D+EmcjcFLIiRG6bhRYPDPfZVqKxO9GdDCohEDs+gD4/LGJc0WSp0k8YkSfd0W6dFxROgN80fgYsanNY=
X-Received: by 2002:a05:6102:8012:b0:4f9:69a9:4ec6 with SMTP id
 ada2fe7eead31-4fa3ff072damr3125742137.26.1753566819439; Sat, 26 Jul 2025
 14:53:39 -0700 (PDT)
Precedence: bulk
X-Mailing-List: git@vger.kernel.org
List-Id: <git.vger.kernel.org>
List-Subscribe: <mailto:git+subscribe@vger.kernel.org>
List-Unsubscribe: <mailto:git+unsubscribe@vger.kernel.org>
MIME-Version: 1.0
References: <xmqqcya63cqx.fsf@gitster.g> <20250721115519.140361-1-usmanakinyemi202@gmail.com>
 <20250721115519.140361-2-usmanakinyemi202@gmail.com> <CALnO6CCN0HUXJVYmvAJO3EoQQZzHVjE0P=g+AUc9c5Ti0Rcm2w@mail.gmail.com>
In-Reply-To: <CALnO6CCN0HUXJVYmvAJO3EoQQZzHVjE0P=g+AUc9c5Ti0Rcm2w@mail.gmail.com>
From: Usman Akinyemi <usmanakinyemi202@gmail.com>
Date: Sun, 27 Jul 2025 03:23:28 +0530
X-Gm-Features: Ac12FXxyfgkLZz7oN-YDnTphsnQDiQt43XNU5j9IQS8CZZm8TsI4aM-aETK36Iw
Message-ID: <CAPSxiM9UiCHEwdOuGi0LLQesvEnSLK+eC8ZfTEVQ+cdYedwuXQ@mail.gmail.com>
Subject: Re: [PATCH v4 1/2] t/t1517: automate `git subcmd -h` tests outside a repository
To: "D. Ben Knoble" <ben.knoble@gmail.com>
Cc: git@vger.kernel.org, gitster@pobox.com, chriscool@tuxfamily.org, 
	christian.couder@gmail.com, me@ttaylorr.com, ps@pks.im
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

> > +do
> > +       cmd=3D${cmd%.*} # strip .sh, .perl, etc.
> > +       case "$cmd" in
> > +       archimport | cvsexportcommit | cvsimport | cvsserver | daemon |=
 \
> > +       difftool--helper | filter-branch | fsck-objects | get-tar-commi=
t-id | \
> > +       http-backend | http-fetch | http-push | init-db | instaweb.sh |=
 \
> > +       merge-octopus | merge-one-file | merge-resolve | mergetool | \
> > +       mktag | p4 | p4.py | pickaxe | quiltimport | remote-ftp | remot=
e-ftps | \
>
> Hm=E2=80=94if we strip the suffix with ${cmd%.*}, do we need a p4.py patt=
ern
> too? Actually, at first I wondered why we need to strip the suffix at
> all. My local Git produces only unsuffixed commands. But
> bin-wrappers/git produces both p4 and p4.py; request-pull and
> request-pull.sh; and several others. So I think stripping is probably
> right, just drop the .py pattern.
Noted and thanks.
>
> > +       remote-http | remote-https | replay | request-pull | send-email=
 | \
> > +       sh-i18n--envsubst | shell | show | stage | submodule | svn | \
> > +       upload-archive--writer | upload-pack | web--browse | whatchange=
d)
> > +               expect_outcome=3Dexpect_failure ;;
> > +       *)
> > +               expect_outcome=3Dexpect_success ;;
> > +       esac
> > +       test_$expect_outcome "'git $cmd -h' outside a repository" '
> > +               test_expect_code 129 nongit git $cmd -h >usage &&
> > +               echo "Hello" &&
>
> Woops! While basing some work on this branch, I spotted this "echo"=E2=80=
=94I
> assume it's leftover and didn't mean to be included here? Will drop
> locally for my own work.
>
Since you based your work on mine, does it mean I do not have to send
the updated patch ?

From mboxrd@z Thu Jan  1 00:00:00 1970
Received: from fout-a6-smtp.messagingengine.com (fout-a6-smtp.messagingengine.com [103.168.172.149])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(No client certificate requested)
	by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7BED81F1517
	for <git@vger.kernel.org>; Mon, 28 Jul 2025 15:08:51 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=103.168.172.149
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
	t=1753715333; cv=none; b=dVEQXKI6uQWNMmTIHHvfGHz5SZKp/ndAc6EMlEctfvNhZahUuLJ+9uZHDZFBCGEfZ0/VQJaw6IUcF2UF0Wb9E8CkGGKBGv67Qauzd5aO54QakAiCARf541LJ37brUk10RbUYK8dGyBjfmX9PfOWWkUgcy5OL/9O73+rzLKoZYjc=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
	s=arc-20240116; t=1753715333; c=relaxed/simple;
	bh=QaJO07CU3pTtWBK+EOEEcijTP9lxi1EmOT9l1mKUXCk=;
	h=From:To:Cc:Subject:In-Reply-To:References:Date:Message-ID:
	 MIME-Version:Content-Type; b=dgQv2tGJ4V4x/cT5QHLoEgCaAL+XiNNRs2SCcZaODzBAZiyQzsBtxHf1QSqfU/Xvo1lGJ1zCAKAg3lkPCfqKL8kg7i5l+22w9mKt8egaJbIXWSM+QV/vFIqgjOejzgIrggojdTiv+SThXGV/EGitTTDzLmQ/48vGcnJzHUr5BnI=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=pobox.com; spf=pass smtp.mailfrom=pobox.com; dkim=pass (2048-bit key) header.d=pobox.com header.i=@pobox.com header.b=dh7UjW1c; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b=KHs4KkBh; arc=none smtp.client-ip=103.168.172.149
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=pobox.com
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=pobox.com
Authentication-Results: smtp.subspace.kernel.org;
	dkim=pass (2048-bit key) header.d=pobox.com header.i=@pobox.com header.b="dh7UjW1c";
	dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="KHs4KkBh"
Received: from phl-compute-09.internal (phl-compute-09.phl.internal [10.202.2.49])
	by mailfout.phl.internal (Postfix) with ESMTP id 8D244EC11FD;
	Mon, 28 Jul 2025 11:08:50 -0400 (EDT)
Received: from phl-frontend-01 ([10.202.2.160])
  by phl-compute-09.internal (MEProxy); Mon, 28 Jul 2025 11:08:50 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pobox.com; h=cc
	:cc:content-transfer-encoding:content-type:content-type:date
	:date:from:from:in-reply-to:in-reply-to:message-id:mime-version
	:references:reply-to:subject:subject:to:to; s=fm2; t=1753715330;
	 x=1753801730; bh=bHukwYvX46XsjRhnsa5pMW5wkIckGvSJwq+ELlzazeo=; b=
	dh7UjW1cXX5GikLVcBqbcxLQKDtr5BVOmHyRY9RMMbj8PoG31t1MZ51gkcduB9s/
	aV/DhrkN8woKfJwTncjwFPRIpgzRmcO4VvtSb8iBjm7cRLZV3zXoK/z8R7O+2246
	Pv74b1/r5PetjK5k7/3F7a3lG95yos6brQTCQ5qrg8W0+T3XX1Qj4k5u29G1HtKN
	QdRNOIg8m4BkBQfEiLP9mbN+78OlvkepVGvQ3LSiWCRT9EMTkrPjh7M818X/dxGM
	5jwvWHCdm2bTvkXREIZ3F4XfZf1OPxMhNe/D9Ng9IJ4+AnK+mNZb9Dqb4pl/fIy3
	momCB/eNbxrTqWDRqoY1gA==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=
	messagingengine.com; h=cc:cc:content-transfer-encoding
	:content-type:content-type:date:date:feedback-id:feedback-id
	:from:from:in-reply-to:in-reply-to:message-id:mime-version
	:references:reply-to:subject:subject:to:to:x-me-proxy
	:x-me-sender:x-me-sender:x-sasl-enc; s=fm3; t=1753715330; x=
	1753801730; bh=bHukwYvX46XsjRhnsa5pMW5wkIckGvSJwq+ELlzazeo=; b=K
	Hs4KkBhPdn29PwUMO93oaTpADS4bi6Df4PZ86xE4eh4N3/CkqWhL5LzdrhciL+cm
	Liftg1BfmaBdd91HRSLrAk1+dHSEP0Fn1YVfS7EAlKWowGrtTUWh7LLJltwFZUcE
	Au1H726FyvrUkxMR2CSP0xRAwfPdeXa7gsQZ1bVm2of3PX5CiPn01tZJRnp8oULN
	X0Lh9Idicouh/k0gBEM78EN0KVkm+cdxrG+3EH3+XeU7cVuiLT3RB6DmV+mvmTJX
	bzYvWjoKnm6b4KwLpCwUtRCCfCYKctk6MRJMHtwjrMeasOqfY6BHShzPoE/3CXRp
	OFig6kGulpv9MtkAHIKIw==
X-ME-Sender: <xms:gpKHaIqln9lAEOn41WaFI6Jpk3i_XJ5zC7XW0rmZmCL7cj2_h-QZdA>
    <xme:gpKHaLk1ePIQWvlyRyzX8p5vVPPxdBF_DH9TUP2CVKD7bPJyLdzFLwCC_zGF84KZY
    7r-gLvX_5Mfi-xRcw>
X-ME-Received: <xmr:gpKHaI0z6KZYPn14j9XwMGmuI26oHQXPnEi-wbaFzbuTbCVJiIqjv1BM2XSdn0USHnZfIxtZI7sUetM0yRD3BwHX_oqwBGyWWsna0zU>
X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeffedrtdefgdelvdeglecutefuodetggdotefrod
    ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpuffrtefokffrpgfnqfghnecuuegr
    ihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjug
    hrpefhvfevufgjfhffkfgfgggtgfesthekofdttderjeenucfhrhhomheplfhunhhiohcu
    vecujfgrmhgrnhhouceoghhithhsthgvrhesphhosghogidrtghomheqnecuggftrfgrth
    htvghrnhepteeiheeugfeigedutefhuedvkeehhedvvedtkeeggfffuefggfeklefgtdei
    udegnecuffhomhgrihhnpehhthhtphdqphhushhhihhnihhtqdgusghinhhsthgrfigvsg
    drshhhnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhep
    ghhithhsthgvrhesphhosghogidrtghomhdpnhgspghrtghpthhtohepkedpmhhouggvpe
    hsmhhtphhouhhtpdhrtghpthhtohepsggvnhdrkhhnohgslhgvsehgmhgrihhlrdgtohhm
    pdhrtghpthhtohepuhhsmhgrnhgrkhhinhihvghmihdvtddvsehgmhgrihhlrdgtohhmpd
    hrtghpthhtohepghhithesvhhgvghrrdhkvghrnhgvlhdrohhrghdprhgtphhtthhopegt
    hhhrihhstghoohhlsehtuhigfhgrmhhilhihrdhorhhgpdhrtghpthhtoheptghhrhhish
    htihgrnhdrtghouhguvghrsehgmhgrihhlrdgtohhmpdhrtghpthhtohepmhgvsehtthgr
    hihlohhrrhdrtghomhdprhgtphhtthhopehpshesphhkshdrihhmpdhrtghpthhtohepgh
    hithhsthgvrhesphhosghogidrtghomh
X-ME-Proxy: <xmx:gpKHaIQvaaOoNHWZNJLn3sz4dpgarDOOds33sSwKZsTWTdhvJUZKAA>
    <xmx:gpKHaBzR4TpOQa-9aRSf23fVzvw3SOmL8sWE7YHBWUYOzEQOByMyGg>
    <xmx:gpKHaICBmISgBcN6F6Y7-8zxLvKFPumBR0iQ3eGY6Snkc2dN3-AhjQ>
    <xmx:gpKHaNED_A3pvxCNVAxZdOhiPqteVX-HwXxazaaKa1K5ZfeCzawXpg>
    <xmx:gpKHaFWMRPHmyyxsyesIVMgelYar6vc1M2sg8-TwiItl-avGw-rYh-bc>
Feedback-ID: if26b431b:Fastmail
Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon,
 28 Jul 2025 11:08:49 -0400 (EDT)
From: Junio C Hamano <gitster@pobox.com>
To: "D. Ben Knoble" <ben.knoble@gmail.com>
Cc: Usman Akinyemi <usmanakinyemi202@gmail.com>,  git@vger.kernel.org,
  chriscool@tuxfamily.org,  christian.couder@gmail.com,  me@ttaylorr.com,
  ps@pks.im
Subject: Re: [PATCH v4 1/2] t/t1517: automate `git subcmd -h` tests outside
 a repository
In-Reply-To: <CALnO6CCN0HUXJVYmvAJO3EoQQZzHVjE0P=g+AUc9c5Ti0Rcm2w@mail.gmail.com>
	(D. Ben Knoble's message of "Sat, 26 Jul 2025 10:34:37 -0400")
References: <xmqqcya63cqx.fsf@gitster.g>
	<20250721115519.140361-1-usmanakinyemi202@gmail.com>
	<20250721115519.140361-2-usmanakinyemi202@gmail.com>
	<CALnO6CCN0HUXJVYmvAJO3EoQQZzHVjE0P=g+AUc9c5Ti0Rcm2w@mail.gmail.com>
Date: Mon, 28 Jul 2025 08:08:48 -0700
Message-ID: <xmqqzfcoxshr.fsf@gitster.g>
User-Agent: Gnus/5.13 (Gnus v5.13)
Precedence: bulk
X-Mailing-List: git@vger.kernel.org
List-Id: <git.vger.kernel.org>
List-Subscribe: <mailto:git+subscribe@vger.kernel.org>
List-Unsubscribe: <mailto:git+unsubscribe@vger.kernel.org>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit

"D. Ben Knoble" <ben.knoble@gmail.com> writes:

>> +for cmd in $(git --list-cmds=main)
>> +do
>> +       cmd=${cmd%.*} # strip .sh, .perl, etc.
>> +       case "$cmd" in
>> +       archimport | cvsexportcommit | cvsimport | cvsserver | daemon | \
>> +       difftool--helper | filter-branch | fsck-objects | get-tar-commit-id | \
>> +       http-backend | http-fetch | http-push | init-db | instaweb.sh | \
>> +       merge-octopus | merge-one-file | merge-resolve | mergetool | \
>> +       mktag | p4 | p4.py | pickaxe | quiltimport | remote-ftp | remote-ftps | \
>
> Hm—if we strip the suffix with ${cmd%.*}, do we need a p4.py
> pattern too?  Actually, at first I wondered why we need to strip
> the suffix at all. My local Git produces only unsuffixed commands.
> ...
> bin-wrappers/git produces both p4 and p4.py; request-pull and
> request-pull.sh; and several others. So I think stripping is probably
> right, just drop the .py pattern.

Ahh, OK, I didn't realize that bin-wrappers gets into the picture.
So you're right.  Fixing the bin-wrappers may be necessary, but
dropping the extra ones is certainly a good idea.

>> +       test_$expect_outcome "'git $cmd -h' outside a repository" '
>> +               test_expect_code 129 nongit git $cmd -h >usage &&
>> +               echo "Hello" &&
>
> Woops! While basing some work on this branch, I spotted this "echo"—I
> assume it's leftover and didn't mean to be included here?

;-)

From mboxrd@z Thu Jan  1 00:00:00 1970
Received: from fout-a6-smtp.messagingengine.com (fout-a6-smtp.messagingengine.com [103.168.172.149])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(No client certificate requested)
	by smtp.subspace.kernel.org (Postfix) with ESMTPS id BF8F426B093
	for <git@vger.kernel.org>; Mon, 28 Jul 2025 15:09:41 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=103.168.172.149
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
	t=1753715383; cv=none; b=Fh+l4Z0Tev8ALlVXZ4LfC04IR6GMOnCi/qeld3N0Ul0MXtxhHp4FBZHUa0dcgXHEb5yXKDX4VsvHkBOHUjNQ+kXJycRy7RqELEokLpRU1Z7305SLVDxu+fFWRBGnzUgKi59C0FUJNqgR6CQN1A0a/X+GDQJIC7RNw3IIKZkAOSw=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
	s=arc-20240116; t=1753715383; c=relaxed/simple;
	bh=gd4sPmfRAoHSHv56mVl9Ea5OObYilGMVpQ6Uit5H7nM=;
	h=From:To:Cc:Subject:In-Reply-To:References:Date:Message-ID:
	 MIME-Version:Content-Type; b=E9/gL3bxdPjQm6VjbQPIzMHLBfdqNnA1pik1lU9dKcNlcJ0ZYpECt1PUwbD5LJgUxGXwxT1GVn04z9ZuG2VeQO1guGoxQREur2f3RUMF8m+mXE7+Bujv8qFxH2P7dxiCu4RMnw7QRlsM7mYEaYvwXHgdlW6csCq9GRtUcfahx3E=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=pobox.com; spf=pass smtp.mailfrom=pobox.com; dkim=pass (2048-bit key) header.d=pobox.com header.i=@pobox.com header.b=MjpAXyuO; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b=K0gXe0he; arc=none smtp.client-ip=103.168.172.149
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=pobox.com
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=pobox.com
Authentication-Results: smtp.subspace.kernel.org;
	dkim=pass (2048-bit key) header.d=pobox.com header.i=@pobox.com header.b="MjpAXyuO";
	dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="K0gXe0he"
Received: from phl-compute-12.internal (phl-compute-12.phl.internal [10.202.2.52])
	by mailfout.phl.internal (Postfix) with ESMTP id AA5DFEC11DC;
	Mon, 28 Jul 2025 11:09:40 -0400 (EDT)
Received: from phl-frontend-02 ([10.202.2.161])
  by phl-compute-12.internal (MEProxy); Mon, 28 Jul 2025 11:09:40 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pobox.com; h=cc
	:cc:content-type:content-type:date:date:from:from:in-reply-to
	:in-reply-to:message-id:mime-version:references:reply-to:subject
	:subject:to:to; s=fm2; t=1753715380; x=1753801780; bh=7YDq7PkSZq
	8JWimy50AQ2qJO0qxbWoMUzKgYAtSMI58=; b=MjpAXyuOa2D01uQlZ0PPPrV8AQ
	8JE/e4oZczewIWUb9sRmoZBVTl2q0E6b29t/J3UhkXfnm/ovO7wKoaTCLb7tLB9Z
	7kzJMk4Y0fCoHprIIx3UkA85Ko78FGN3eC0Hz/Q0pbCcCqeH20idkiJFHTOM38Lk
	+wGoXL292BfFZmyk9ENgOk/O3ULd+ReZsG0AIh6Lz92YWS3NQOkhCEaL1gONn2kP
	gdItbM6U98kjR4a/QX9mk6TxoMcjmMJkD0Szvd5Aze4jzOmcfrIGoF6p4znMwVxW
	/bBzTWAGauwoehGfBKBFDKsG5BC8eOJeS8pkHDklMo5IYbKSHSP9FRjOZMSw==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=
	messagingengine.com; h=cc:cc:content-type:content-type:date:date
	:feedback-id:feedback-id:from:from:in-reply-to:in-reply-to
	:message-id:mime-version:references:reply-to:subject:subject:to
	:to:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm3; t=
	1753715380; x=1753801780; bh=7YDq7PkSZq8JWimy50AQ2qJO0qxbWoMUzKg
	YAtSMI58=; b=K0gXe0heouqdUoYPlSyhIOGj7VHecpAhHu8pMAZ4f7mtzKBPMAu
	/MK3+/sRJUu9o9+YClxOcP9Z+tGBLAKzmermwHn0cegHVmUKVfkicpsZvg8eslQ6
	uzu30+mDhieAAVlCH/0nXAsy7dbxL34Y+S9kLNCC/89m8OE4CaOg0pHifEd+YzL3
	70hyKTOrTb/qd2lxGP0ghcvlTJbhRcWL1HaKatPQYyW9Vh/Ox6jDbvgZ41FggMgo
	nwlvVb8rrzRjO5cniAwb2YGKKynLNgyohUFoXcX9dAQb0slwlxLsaf6gu7KbAiP6
	6gsIConsJyVMreJs00QHzhdmjP5WFHYMYnA==
X-ME-Sender: <xms:tJKHaFlqtCOJNdP0-Vgr3H41L-tEyxmUwzn01Op5u7KgKbVmIUO_mA>
    <xme:tJKHaNz79Ra8ASqWQ7YkGlewNi6dkl2z75PxbxJv3gwG52MJIqn5fChfFedQr2WQ4
    COuzKXpxGkjNRgncQ>
X-ME-Received: <xmr:tJKHaHQCvTKbKQU8z86p-_FZP95Mk-bYKZkvY4T8CiJ1tLvdg3UOUvSlJukXO6Dvufki6jlav7tYBslN9wmIyyXM580ulv4llghQZ3k>
X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeffedrtdefgdelvdeglecutefuodetggdotefrod
    ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpuffrtefokffrpgfnqfghnecuuegr
    ihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjug
    hrpefhvfevufgjfhffkfgfgggtsehttdertddtredtnecuhfhrohhmpefluhhnihhoucev
    ucfjrghmrghnohcuoehgihhtshhtvghrsehpohgsohigrdgtohhmqeenucggtffrrghtth
    gvrhhnpeefveetteejheeugeffledvteeiveffueefjeelueffteeigffgfedthfefieeg
    ieenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehgih
    htshhtvghrsehpohgsohigrdgtohhmpdhnsggprhgtphhtthhopeekpdhmohguvgepshhm
    thhpohhuthdprhgtphhtthhopegsvghnrdhknhhosghlvgesghhmrghilhdrtghomhdprh
    gtphhtthhopehushhmrghnrghkihhnhigvmhhivddtvdesghhmrghilhdrtghomhdprhgt
    phhtthhopehgihhtsehvghgvrhdrkhgvrhhnvghlrdhorhhgpdhrtghpthhtoheptghhrh
    hishgtohholhesthhugihfrghmihhlhidrohhrghdprhgtphhtthhopegthhhrihhsthhi
    rghnrdgtohhuuggvrhesghhmrghilhdrtghomhdprhgtphhtthhopehmvgesthhtrgihlh
    horhhrrdgtohhmpdhrtghpthhtohepphhssehpkhhsrdhimhdprhgtphhtthhopehgihht
    shhtvghrsehpohgsohigrdgtohhm
X-ME-Proxy: <xmx:tJKHaN_R3G2jQxQbz9zJzGXxu6v-I7QeeYimvlScF3gNpr5UNbQ7cQ>
    <xmx:tJKHaNuz3-eMOSUaAvZHc4jg-hpxuAd7CQm9mq5k_HawI2KoZ9sx5A>
    <xmx:tJKHaNOmffA4ZuT7CekbfvVFEybW3UnsW3MqDskNvzl5z4Cj-LU3_w>
    <xmx:tJKHaCh6mUBIHchxwSRKYi9_lVZV2BJeWdYTv5yWyPZkG10cfS1lxQ>
    <xmx:tJKHaBzv3fYvnuhXGultKeX6Ec8MPin-l8FtIuYOn0YvPdX707i0DzAJ>
Feedback-ID: if26b431b:Fastmail
Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon,
 28 Jul 2025 11:09:39 -0400 (EDT)
From: Junio C Hamano <gitster@pobox.com>
To: "D. Ben Knoble" <ben.knoble@gmail.com>
Cc: Usman Akinyemi <usmanakinyemi202@gmail.com>,  git@vger.kernel.org,
  chriscool@tuxfamily.org,  christian.couder@gmail.com,  me@ttaylorr.com,
  ps@pks.im
Subject: Re: [PATCH v4 1/2] t/t1517: automate `git subcmd -h` tests outside
 a repository
In-Reply-To: <CALnO6CCFXfPDZKzx1SBufwzkBJchZr0XYigo_8AQ_U=MuJa7xg@mail.gmail.com>
	(D. Ben Knoble's message of "Sat, 26 Jul 2025 10:37:33 -0400")
References: <xmqqcya63cqx.fsf@gitster.g>
	<20250721115519.140361-1-usmanakinyemi202@gmail.com>
	<20250721115519.140361-2-usmanakinyemi202@gmail.com>
	<CALnO6CCFXfPDZKzx1SBufwzkBJchZr0XYigo_8AQ_U=MuJa7xg@mail.gmail.com>
Date: Mon, 28 Jul 2025 08:09:38 -0700
Message-ID: <xmqqv7ncxsgd.fsf@gitster.g>
User-Agent: Gnus/5.13 (Gnus v5.13)
Precedence: bulk
X-Mailing-List: git@vger.kernel.org
List-Id: <git.vger.kernel.org>
List-Subscribe: <mailto:git+subscribe@vger.kernel.org>
List-Unsubscribe: <mailto:git+unsubscribe@vger.kernel.org>
MIME-Version: 1.0
Content-Type: text/plain

"D. Ben Knoble" <ben.knoble@gmail.com> writes:

> Sorry, one more thing: I spot-checked a few of these, and it seems the
> main issue that causes failures is the exit code; they seem to work
> with "-h" outside a repo. Out of scope for this series, but something
> worth tidying up as #leftoverbits ?

Great suggestion.  Thanks.

From mboxrd@z Thu Jan  1 00:00:00 1970
Received: from mail-ej1-f45.google.com (mail-ej1-f45.google.com [209.85.218.45])
	(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
	(No client certificate requested)
	by smtp.subspace.kernel.org (Postfix) with ESMTPS id 2E53C1B0F0A
	for <git@vger.kernel.org>; Wed, 30 Jul 2025 21:14:43 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.218.45
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
	t=1753910085; cv=none; b=BWfaJ3HeGsjhmwWb27nhLwSPnwjya4b1FIp4SKIBIHT34T71eUlfsOWLooxkCcudqE0m4E9oi2CLLJVmMwwKJsUiFMGAs/BEFKixZJ9lPqHSoefFFsh9sWUxJpHRjUZMb0z0RSmWmfl8jq5hu5Ouh+Dc08tq5KQcJPBocA4i7/M=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
	s=arc-20240116; t=1753910085; c=relaxed/simple;
	bh=ovG2XUoiL/amN0L0twTsCBGWno6NAI0LErbTJ8a4H/I=;
	h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject:
	 To:Cc:Content-Type; b=uQC0JLCuTB0Zx9yHzQ1RrC5wtsC1JARidgfNK/RVwYk8SgV8qDszdaiyYl9Kzxr6eI+tMlMIGA9rJ18WpPc0Z2B/a2b13s/lJp5htGKOHAXXgF8HwK3nQDfLCl1f5yUZmO1ONKB1I3PKT+PcbHbyhPVrzt1hkSrW9LsUY74CKjg=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=dIlEj8j2; arc=none smtp.client-ip=209.85.218.45
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.b="dIlEj8j2"
Received: by mail-ej1-f45.google.com with SMTP id a640c23a62f3a-ae0dd7ac1f5so42076366b.2
        for <git@vger.kernel.org>; Wed, 30 Jul 2025 14:14:43 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=20230601; t=1753910082; x=1754514882; darn=vger.kernel.org;
        h=content-transfer-encoding:cc:to:subject:message-id:date:from
         :in-reply-to:references:mime-version:from:to:cc:subject:date
         :message-id:reply-to;
        bh=iSCkDEDgGyeTQvejX66eVwwbg9PM3XH0u/5jocsEx9A=;
        b=dIlEj8j25t/EVhNNIjAJig2rYQVR/oevmgUBBpzolFjyrlveOtjuSiSn1YlrxGy0d8
         4KH5kB1ClrcEMRetVvKhIqoOAJyxuf6YlgvzrEAeB2pO1Nqd3C5KlLq2AP/70x3KvEr2
         BxDPTX6fxCZnWCqGiIaE/1Oy17KBXFlrhESiawcJwhkksbfZ/p7Mi3ocbcsHeeATYHnS
         YG8xqfKkOQMmS2OV2VGnfquJjK5Ng+joKmEx22aazSZwWuX1B8V3C6xoXYlH89YQsoV6
         Ao12ked3clsFbLa1UcyjsBeGHGbHjaH3PrqJhv93mY06vlzPXXG3YAtEPfHO2g7bhSWw
         J8sw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20230601; t=1753910082; x=1754514882;
        h=content-transfer-encoding:cc:to:subject:message-id:date:from
         :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc
         :subject:date:message-id:reply-to;
        bh=iSCkDEDgGyeTQvejX66eVwwbg9PM3XH0u/5jocsEx9A=;
        b=U53Z8CmJc8PaiNFkW6nJpEOdlxLb4YvJjwQxJWfYrh6RVC0BzYLlf4uT3+QcavY7Rv
         i7CY3ptQaZFToVfOJYL9wI951wvJA65A7qM7qDTXUiCwWHOUCGoxi+PnUO7cHTJNt6jP
         9YJcpoKDSlxRjzlNOpJ4FOy6Cpgoz/TYbEvpI56qjWxTkIT0Ppg6el1iqeEH/3bymlFO
         E0KaX1+d/bZWvcxHsPkLDUVwPWZctu+EIjfH/CMH5kQzhGBNGBNiF4gsv7VOg0MnLnux
         EeMW/LpRthjo2iHgPMotKt2zCPn206gf+WIljgq2X+7TOnaMH+8oYYoki5mIRy1f6DAv
         xJSw==
X-Gm-Message-State: AOJu0YwJKI5p8ePYa+p4YLUViO5zPOkqsxpR6NDTtwsoUYLm3goLR6s1
	puqSU1pilkCxkTCWRtEsqN6y8vqzkAIGm2Pq/GdZQqeU5XxQiKRCEJUEt03y8cvisvtEZcBstbt
	l5Qx0TdIbfwwV+ql20VTZrPJUUe7kutQ=
X-Gm-Gg: ASbGncs+pvD724xx7w7Hd2S1sw/LaufvNDnNLnDbbkN9i0cYpdc+yu2uNFC78xcB6cx
	xhOFSBEJ2vAXhohK8ZcQW1Sej/oIl9lAqALGD2WUKXYzuKBiRm1oXm/StBKGmo7arv3uAOJpzw4
	scEa496KoWmORUkZuGrjfvyDEh9MfpAIvuz2PjFsXgTuWScX6n2hpOV9mCMU32USol8q92LW8yZ
	swIcuQrGW9hnncGDVjbNU/0fL0qznNyiaUvDY/qonbW0J9H0jH0
X-Google-Smtp-Source: AGHT+IF78ykg4igtXQS4FPrS7wOB+SGhFaIP8LTv3cVndigMI9qLNrKGHYK7sqshN71Tpsa7g4kTtTqFEr8ulxRmEK4=
X-Received: by 2002:a17:907:7b91:b0:ae8:476c:3b85 with SMTP id
 a640c23a62f3a-af8fd58c2d7mr425254366b.8.1753910082200; Wed, 30 Jul 2025
 14:14:42 -0700 (PDT)
Precedence: bulk
X-Mailing-List: git@vger.kernel.org
List-Id: <git.vger.kernel.org>
List-Subscribe: <mailto:git+subscribe@vger.kernel.org>
List-Unsubscribe: <mailto:git+unsubscribe@vger.kernel.org>
MIME-Version: 1.0
References: <xmqqcya63cqx.fsf@gitster.g> <20250721115519.140361-1-usmanakinyemi202@gmail.com>
 <20250721115519.140361-2-usmanakinyemi202@gmail.com> <CALnO6CCN0HUXJVYmvAJO3EoQQZzHVjE0P=g+AUc9c5Ti0Rcm2w@mail.gmail.com>
 <CAPSxiM9UiCHEwdOuGi0LLQesvEnSLK+eC8ZfTEVQ+cdYedwuXQ@mail.gmail.com>
In-Reply-To: <CAPSxiM9UiCHEwdOuGi0LLQesvEnSLK+eC8ZfTEVQ+cdYedwuXQ@mail.gmail.com>
From: "D. Ben Knoble" <ben.knoble@gmail.com>
Date: Wed, 30 Jul 2025 17:14:31 -0400
X-Gm-Features: Ac12FXwrI6bkz5u9g2lfmX7L3ZQCZJPknoqMcJ6au64eBJuZYdZkVU0cIugRI1E
Message-ID: <CALnO6CCJZ+knJr+ANLfNievB3krirDWcnaM7u_KYBRTcfGDE5A@mail.gmail.com>
Subject: Re: [PATCH v4 1/2] t/t1517: automate `git subcmd -h` tests outside a repository
To: Usman Akinyemi <usmanakinyemi202@gmail.com>
Cc: git@vger.kernel.org, gitster@pobox.com, chriscool@tuxfamily.org, 
	christian.couder@gmail.com, me@ttaylorr.com, ps@pks.im
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

On Sat, Jul 26, 2025 at 5:53=E2=80=AFPM Usman Akinyemi
<usmanakinyemi202@gmail.com> wrote:
> > > +       remote-http | remote-https | replay | request-pull | send-ema=
il | \
> > > +       sh-i18n--envsubst | shell | show | stage | submodule | svn | =
\
> > > +       upload-archive--writer | upload-pack | web--browse | whatchan=
ged)
> > > +               expect_outcome=3Dexpect_failure ;;
> > > +       *)
> > > +               expect_outcome=3Dexpect_success ;;
> > > +       esac
> > > +       test_$expect_outcome "'git $cmd -h' outside a repository" '
> > > +               test_expect_code 129 nongit git $cmd -h >usage &&
> > > +               echo "Hello" &&
> >
> > Woops! While basing some work on this branch, I spotted this "echo"=E2=
=80=94I
> > assume it's leftover and didn't mean to be included here? Will drop
> > locally for my own work.
> >
> Since you based your work on mine, does it mean I do not have to send
> the updated patch ?

That's more a question for Junio than me, but I'm comfortable rebasing
my work on top of updated versions of your branch=E2=80=94and I would prefe=
r
to keep iterations of this series separate from my own, heh.

Really I hope you'll squash my fixes in, and possibly a few others,
and send another version? For example:
- pickaxe is a failure because the message is about blame;
- show is a failure because the message is about log _and_ show;
- init-db is a failure because the message is about init;
- whatchanged is a failure because the message is about log/show.
Maybe these are "out of scope," which is fine=E2=80=94but I think they are
working as intended?

--=20
D. Ben Knoble

From mboxrd@z Thu Jan  1 00:00:00 1970
Received: from mail-ed1-f47.google.com (mail-ed1-f47.google.com [209.85.208.47])
	(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
	(No client certificate requested)
	by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5A08E22126A
	for <git@vger.kernel.org>; Wed, 30 Jul 2025 21:15:45 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.47
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
	t=1753910147; cv=none; b=HdYD9C6PPKQ5IP8H4+A3cIyqoPNtPhzwXeLCAULHs3sBgtDFAJ6xxjDxSTMuHvbyicqm/abt/KrjteHEPEQvNkLw1+Nca42x1qUYHg9CvF6lig1Fk/C4UN2PRjOMD+sSiaBPpgfu0o4I62ETw3UtTFJdnAVb2hS30qIKFch+W2A=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
	s=arc-20240116; t=1753910147; c=relaxed/simple;
	bh=1M/nEQ4+TCi2eTFldLVo5TNMGaQ5DsWCHs4l6AaQBWk=;
	h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject:
	 To:Cc:Content-Type; b=eHmaOyjA5bY2Ey2mtmXkNZqRjOOqvubu4jkX219pgXZpYz1hzv/pWG9wNaRrnjbDraMrnuYF6a0ZEXIxzirlgAHHPmQhd0Qj/f4jvEb7LriAcxkjE8Y2FqCJDB24xHwZsYnnMDpxtZ1Xkix1FG5eMXeU66cAx6a0wNQSgQZJ3Tw=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=B6H9VAYG; arc=none smtp.client-ip=209.85.208.47
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.b="B6H9VAYG"
Received: by mail-ed1-f47.google.com with SMTP id 4fb4d7f45d1cf-6157c81ff9eso298540a12.3
        for <git@vger.kernel.org>; Wed, 30 Jul 2025 14:15:44 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=20230601; t=1753910143; x=1754514943; darn=vger.kernel.org;
        h=content-transfer-encoding:cc:to:subject:message-id:date:from
         :in-reply-to:references:mime-version:from:to:cc:subject:date
         :message-id:reply-to;
        bh=rqOyBRdFv3LXfuIbcYFjQKvotIEBDOKaIQ3YrVmeApI=;
        b=B6H9VAYG/rX/XYYJv2xMepDcR/hvdc6Uuzl/2tCyfcJsfn+l85Zbn4y2yATFZoJPu+
         OYKW5uYgObVwkGkAAUp6M6n3syNsAnAnIjQxVyKVAYfjdvIVkKWBhl/o9pP0jf1yeLO3
         OyPquIe7idVjAFchMgfz6yQwvpvGwbbOK/QMfdBioTpLEotB/oZMAQIsvfEiTq/h04/H
         A2C/Z1zSXdm7vihPEcWBjKP1bhTlFZ7EDvB8NwYIMWozLL7RpBrzhCSKuhBJRCQhuxaj
         sZWhS+asnznJoDdEtBSsvjpX+C5plJ95OxGGdsbvyPXLP1G2jSV3aGG2u1IkwtXqycly
         QhwQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20230601; t=1753910143; x=1754514943;
        h=content-transfer-encoding:cc:to:subject:message-id:date:from
         :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc
         :subject:date:message-id:reply-to;
        bh=rqOyBRdFv3LXfuIbcYFjQKvotIEBDOKaIQ3YrVmeApI=;
        b=mpX4Vq8vwmT0QeWbF+OsF7xlpzo+Q9w2Om28r9+R3aXxTHIHOVOz5YBS70VDTbCDVx
         a2gIZDeaXbYxBrVMLCPINF3AlhAhRXEjXAlmF7MiwfZluVuRdHS2j++5zmt4umuX7FqN
         P4QtxECvRFBLDnJ6Gb0LL3PkHL/g9+LuM2OtmmpJxqGZre1ioXuVVWz+KDd1EKNxV1HT
         EBJz8x6pjaD+eqzeOg9evb9anZafOIaUpqz1zW8zNAFhZ9pAsRgP683ujeUacXLvtVSp
         GPtSBcpQzcb+ipD+AKahMGIfA/z7/uFr6b8iNzarZZ0/xtdtb7xUeF11FdMyEIL7LmUz
         M16Q==
X-Gm-Message-State: AOJu0YzpMbOC600PKGtzxIdO3/Dd898QSOhVp3zmFZ2YE97RtmiC5Mfw
	qSXCtyU9+dbtUVftGNPtUTRbXYJ/ltA2GmHXnY1KzwOzhq8EkuJgNRpeHANL0h3p9V6mV975+LZ
	z598QEY81me5o8Xg2Zccu3XGjdJohoHl8Tewy
X-Gm-Gg: ASbGnctUur4j4WaUou8KrEQlSOtbKfx4BNf+NoOu9KXFDs3m0bDhSOX10XHJVabnE7W
	ihzX8Ht7ko32EB8BAzy6Sgm0TCkxqK1qwSizvP5efbPub6kKCcOXChbXTtT6dIhpPzKs5NJ3T7+
	YcUpShDMVkYi+RQ3Wad1bxkz+cVPsbhEan9MZRu9mnVAIVuG6nB72zYbGuFeG7X5EnQs5RqpLMU
	t0igpkmxH4pIqGzOpeLPCRKf/xwooIkpiMiVxUwUg==
X-Google-Smtp-Source: AGHT+IEageXGfYzVyYK7N6twfuIXeEs+MCb8aXtKC1uPRT6csDyRzT4GXkWKyVxl8P3Ib0Ozrzv6AIg8bBbU3YNdSnw=
X-Received: by 2002:a17:907:3f1b:b0:af1:8be4:768 with SMTP id
 a640c23a62f3a-af8fd680fd2mr571147866b.5.1753910143363; Wed, 30 Jul 2025
 14:15:43 -0700 (PDT)
Precedence: bulk
X-Mailing-List: git@vger.kernel.org
List-Id: <git.vger.kernel.org>
List-Subscribe: <mailto:git+subscribe@vger.kernel.org>
List-Unsubscribe: <mailto:git+unsubscribe@vger.kernel.org>
MIME-Version: 1.0
References: <xmqqcya63cqx.fsf@gitster.g> <20250721115519.140361-1-usmanakinyemi202@gmail.com>
 <20250721115519.140361-2-usmanakinyemi202@gmail.com> <CALnO6CCFXfPDZKzx1SBufwzkBJchZr0XYigo_8AQ_U=MuJa7xg@mail.gmail.com>
 <CAPSxiM_sP7MG5SDLe-_-FULhqmW10M=8Ssu3PMoZD8=rS6CkAA@mail.gmail.com>
In-Reply-To: <CAPSxiM_sP7MG5SDLe-_-FULhqmW10M=8Ssu3PMoZD8=rS6CkAA@mail.gmail.com>
From: "D. Ben Knoble" <ben.knoble@gmail.com>
Date: Wed, 30 Jul 2025 17:15:32 -0400
X-Gm-Features: Ac12FXyO4DgmFy9x-G4K7FoEsQtMC5ZkQI8ZGuydGvKO7MEq1Bi60KC873cScWk
Message-ID: <CALnO6CBB6AR+PKVveyB0oo0Ax3cFqZ-AAs7o0oo+n9doyJL8KA@mail.gmail.com>
Subject: Re: [PATCH v4 1/2] t/t1517: automate `git subcmd -h` tests outside a repository
To: Usman Akinyemi <usmanakinyemi202@gmail.com>
Cc: git@vger.kernel.org, gitster@pobox.com, chriscool@tuxfamily.org, 
	christian.couder@gmail.com, me@ttaylorr.com, ps@pks.im
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

On Sat, Jul 26, 2025 at 5:51=E2=80=AFPM Usman Akinyemi
<usmanakinyemi202@gmail.com> wrote:
>
> > > +for cmd in $(git --list-cmds=3Dmain)
> > > +do
> > > +       cmd=3D${cmd%.*} # strip .sh, .perl, etc.
> > > +       case "$cmd" in
> > > +       archimport | cvsexportcommit | cvsimport | cvsserver | daemon=
 | \
> > > +       difftool--helper | filter-branch | fsck-objects | get-tar-com=
mit-id | \
> > > +       http-backend | http-fetch | http-push | init-db | instaweb.sh=
 | \
> > > +       merge-octopus | merge-one-file | merge-resolve | mergetool | =
\
> > > +       mktag | p4 | p4.py | pickaxe | quiltimport | remote-ftp | rem=
ote-ftps | \
> > > +       remote-http | remote-https | replay | request-pull | send-ema=
il | \
> > > +       sh-i18n--envsubst | shell | show | stage | submodule | svn | =
\
> > > +       upload-archive--writer | upload-pack | web--browse | whatchan=
ged)
> >
> > Sorry, one more thing: I spot-checked a few of these, and it seems the
> > main issue that causes failures is the exit code; they seem to work
> > with "-h" outside a repo. Out of scope for this series, but something
> > worth tidying up as #leftoverbits ?
> >
> You meant the exit code of 129 right ?

Yep: some of our commands (often the ones implemented as scripts?)
don't exit 129. Fixing that is certainly out-of-scope for this
otherwise-tightly focused series.

--=20
D. Ben Knoble

From mboxrd@z Thu Jan  1 00:00:00 1970
Received: from mail-ej1-f49.google.com (mail-ej1-f49.google.com [209.85.218.49])
	(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
	(No client certificate requested)
	by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6F1B01519AC
	for <git@vger.kernel.org>; Sat,  2 Aug 2025 19:56:42 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.218.49
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
	t=1754164604; cv=none; b=Vm2lO9DDnXsyT0yuiJ04FAHj2ps1gxt8/GfjtBHYwv/JbZWnOJP3pVIW/3/6pElX9lUT2zagi0ltdGXsLFuLDDpuQDa0gsa06Sd81zZdz2IMYB4f3GnSklwmKikVYnMyaVR+CZbFiYBZFdZ0ySCcO1z/Jp84rEyM3FmNSICxDyc=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
	s=arc-20240116; t=1754164604; c=relaxed/simple;
	bh=zels5FlXciVjmxt8AJ5exS+oP7MM21V1qUvhPW4GtLI=;
	h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject:
	 To:Cc:Content-Type; b=mBqRCY/Lo+7TPtaHkt2BzLeuRypDq/xLyy+968Sn/XeU6B//Ejdu6KPe1k4gMgTw9My8s9wspK3LocEStJcc7ujXSAKc5DBKqbfmOIXTbVOdb+v/DDvMwtMYceaMYVgkfe/xBTp/crbtLpGt9Q4qVYcGWEIO40QgQpR6720q/rE=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=jk8o7iLR; arc=none smtp.client-ip=209.85.218.49
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.b="jk8o7iLR"
Received: by mail-ej1-f49.google.com with SMTP id a640c23a62f3a-af0dc229478so301968866b.1
        for <git@vger.kernel.org>; Sat, 02 Aug 2025 12:56:42 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=20230601; t=1754164601; x=1754769401; darn=vger.kernel.org;
        h=content-transfer-encoding:cc:to:subject:message-id:date:from
         :in-reply-to:references:mime-version:from:to:cc:subject:date
         :message-id:reply-to;
        bh=6B6/PvVa2fKJL8wvcAwhOIMa09eU2VnN0hwAcw0R8Rg=;
        b=jk8o7iLRhEjaou2zQ+6Zh2eDM5scdzBvT7x5gyTtfN4J1dExR0bpDXDvFy9/SXpIO5
         0G7AriyMCCdkJTKxe5YcDodJuB83iJK8PclxY2FYXKHBzwASY/HxEXyJRrelCdCquUZJ
         9F7BM86w5kkmDHRQAu0p2cR/mlD9J5sc4SrYEnoX1LIW0ikT4UJDkHagf4Z7PGcbRtka
         FrP7LTj9RxKJ7buL0rQnvQSGwNWTGoW4JIHvV1ex2dDPN50MppxtB3jO0fP3Xe5JJsYd
         qcq9iHVQivBbOR3BNMmZE0grVcAW7xUGoU1tUjsuFK8QOctQMFq6ti5sccq8aaza25QI
         oqxQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20230601; t=1754164601; x=1754769401;
        h=content-transfer-encoding:cc:to:subject:message-id:date:from
         :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc
         :subject:date:message-id:reply-to;
        bh=6B6/PvVa2fKJL8wvcAwhOIMa09eU2VnN0hwAcw0R8Rg=;
        b=JF9jvQh80zO9ZjgioMggP84GtUcd9XcljisVrJ4S7t62EuA9U1vXBX2eT38ZIiw44d
         R/Xet6wYpJy8hiuxP4DqJzSK7cB+ag1i7RMrVBljTog3H1PWG5o77XwM1hij7Z1QtiIg
         9Veclp9qY66+/OJgmm9VfexBLP4XzW1+mlaiY4MinxLS9duYO4E044pYqGj1+FKKhQTR
         pURC7CKdpAdvoLq/RXpoyakkjvkgrtQam7+9lQmDMuTD/srlIrrBOz9yKI2V7H/Uh4sq
         sJOFDHNBvr8yuj4HQghQnMaxiNd/I8pu+jBDGPm/tGLTO1H2pOcS6709trK5QlykoeN8
         FfJA==
X-Gm-Message-State: AOJu0YxODXGmibEfjJdeICUfP5uDCdRTiPHh0IU/iqL6Kro/XwMhaTbj
	9OwLGcWxS5IqX1D0JPt0DnhWKx9TpRcLUnKvbOKN6B4OelE+OrgYkeYggkwvBr8t3S+LhurI6nq
	3cIzokqTCNNOyvkr7Tclng2wCZdgLa2M=
X-Gm-Gg: ASbGncuF3wVmdRS5yEAX6rD7j0tlsaJw0JV0F91wYHiQrZwzB0wvhG/DKSapWuV4+un
	diPpUcsglS0E7DwNJgBNDLzWE8Dg/r8DTQbEKVRMjE8z30UZLrZC2+ikl6XqetMPOmw8Ss4LPj+
	YSFryPxy4jA1t3AXSbuFe6ZmoqZL6/ESHlZFtycRogmywlRms9b9emZQW9CmofFpkaaB3BJKG9+
	2vxGHO0PqUluDhOzJDau7VAdNLEijSObkKld4apX6HCTYUvmVtd
X-Google-Smtp-Source: AGHT+IE3bPtWvmJ2t7uUubJN+H0PiJSyYnB+LubZ33LbPhJL05qkjEQ1Nkw5sLciLDeviupj9RrYYGtHD7mV7D0guv8=
X-Received: by 2002:a17:907:dac:b0:ae3:a799:8e84 with SMTP id
 a640c23a62f3a-af93ffbd4eemr394198766b.8.1754164600451; Sat, 02 Aug 2025
 12:56:40 -0700 (PDT)
Precedence: bulk
X-Mailing-List: git@vger.kernel.org
List-Id: <git.vger.kernel.org>
List-Subscribe: <mailto:git+subscribe@vger.kernel.org>
List-Unsubscribe: <mailto:git+unsubscribe@vger.kernel.org>
MIME-Version: 1.0
References: <xmqqcya63cqx.fsf@gitster.g> <20250721115519.140361-1-usmanakinyemi202@gmail.com>
 <20250721115519.140361-2-usmanakinyemi202@gmail.com> <CALnO6CCN0HUXJVYmvAJO3EoQQZzHVjE0P=g+AUc9c5Ti0Rcm2w@mail.gmail.com>
In-Reply-To: <CALnO6CCN0HUXJVYmvAJO3EoQQZzHVjE0P=g+AUc9c5Ti0Rcm2w@mail.gmail.com>
From: "D. Ben Knoble" <ben.knoble@gmail.com>
Date: Sat, 2 Aug 2025 15:56:29 -0400
X-Gm-Features: Ac12FXwG9ibS8jHE_xh9mXZXhihabKqP7Zf0Ii7QD1f_FgqHBpMwSokuIi5KeDY
Message-ID: <CALnO6CAPBsxg=-aXVUUJSKrPLWWPLGdEM=k5J=GVoh5fVTAhYQ@mail.gmail.com>
Subject: Re: [PATCH v4 1/2] t/t1517: automate `git subcmd -h` tests outside a repository
To: Usman Akinyemi <usmanakinyemi202@gmail.com>
Cc: git@vger.kernel.org, gitster@pobox.com, chriscool@tuxfamily.org, 
	christian.couder@gmail.com, me@ttaylorr.com, ps@pks.im
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

On Sat, Jul 26, 2025 at 10:34=E2=80=AFAM D. Ben Knoble <ben.knoble@gmail.co=
m> wrote:
>
> On Mon, Jul 21, 2025 at 7:55=E2=80=AFAM Usman Akinyemi
> <usmanakinyemi202@gmail.com> wrote:
> >
> > Replace manual `-h` tests with a loop over all subcommands using
> > `git --list-cmds=3Dmain`. This ensures consistent coverage of `-h`
> > behavior outside a repo and future-proofs the test by covering
> > new commands automatically.
> >
> > Known exceptions are skipped or marked as expected failures.
> >
> > Suggested-by: Patrick Steinhardt <ps@pks.im>
> > Helped-by: Junio C Hamano <gitster@pobox.com>
> > Signed-off-by: Usman Akinyemi <usmanakinyemi202@gmail.com>
> > ---
> >  t/t1517-outside-repo.sh | 25 +++++++++++++++++++++++--
> >  1 file changed, 23 insertions(+), 2 deletions(-)
> >
> > diff --git a/t/t1517-outside-repo.sh b/t/t1517-outside-repo.sh
> > index 6824581317..9fcebb7d94 100755
> > --- a/t/t1517-outside-repo.sh
> > +++ b/t/t1517-outside-repo.sh
> > @@ -110,8 +110,29 @@ test_expect_success LIBCURL 'remote-http outside r=
epository' '
> >  test_expect_success 'update-server-info does not crash with -h' '
> >         test_expect_code 129 git update-server-info -h >usage &&
> >         test_grep "[Uu]sage: git update-server-info " usage &&
> > -       test_expect_code 129 nongit git update-server-info -h >usage &&
> > -       test_grep "[Uu]sage: git update-server-info " usage
> >  '
> >
> > +for cmd in $(git --list-cmds=3Dmain)
> > +do
> > +       cmd=3D${cmd%.*} # strip .sh, .perl, etc.
> > +       case "$cmd" in
> > +       archimport | cvsexportcommit | cvsimport | cvsserver | daemon |=
 \
> > +       difftool--helper | filter-branch | fsck-objects | get-tar-commi=
t-id | \
> > +       http-backend | http-fetch | http-push | init-db | instaweb.sh |=
 \
> > +       merge-octopus | merge-one-file | merge-resolve | mergetool | \
> > +       mktag | p4 | p4.py | pickaxe | quiltimport | remote-ftp | remot=
e-ftps | \
>
> Hm=E2=80=94if we strip the suffix with ${cmd%.*}, do we need a p4.py patt=
ern
> too? Actually, at first I wondered why we need to strip the suffix at
> all. My local Git produces only unsuffixed commands. But
> bin-wrappers/git produces both p4 and p4.py; request-pull and
> request-pull.sh; and several others. So I think stripping is probably
> right, just drop the .py pattern.

I think that using "instaweb.sh" instead of "instaweb" also causes
this to fail on Windows, like:

https://github.com/benknoble/git/actions/runs/16695826272/job/47259908953

--=20
D. Ben Knoble

From mboxrd@z Thu Jan  1 00:00:00 1970
Received: from mail-vs1-f50.google.com (mail-vs1-f50.google.com [209.85.217.50])
	(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
	(No client certificate requested)
	by smtp.subspace.kernel.org (Postfix) with ESMTPS id D9D99249E5
	for <git@vger.kernel.org>; Sun,  3 Aug 2025 01:27:50 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.217.50
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
	t=1754184472; cv=none; b=VqKT4ziJN96i0MLwQl4r3AwKMoeaNMPYlBU3g+joqUYq2ln6vCyNkfY0fQggy3R7mJf3Wr1iVSxdUYlz39r3e0dp6nFQzeSt/aI+BZhqVPIE67chwBfXdXVLuHxnDXGfac6Z4hVLdcY+ih8dd2clttfhfDs+Tf/ORjYyUDTLl68=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
	s=arc-20240116; t=1754184472; c=relaxed/simple;
	bh=Sis5PnNAfBMlAVeFw8+wnWUKq/SryQ+D5a6Zv1k1rKc=;
	h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject:
	 To:Cc:Content-Type; b=kEw8zovlH+qLHXJiQP0vcnJxaUbnuax5CywOcn5xGVwASD8vxMxKTUE51BzVJyFfz0VT6PORVXgvf7taSry1ehYC7c7WenCjKGwuowiAYroyMcNM8ml2R5SBG8wWyTQmPjPjv26B2mFuOVNAY4Lj5s5aTIrp3sboRQ0LJNx1wX0=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=XvHkSCYZ; arc=none smtp.client-ip=209.85.217.50
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.b="XvHkSCYZ"
Received: by mail-vs1-f50.google.com with SMTP id ada2fe7eead31-4fbf1326dfeso2491607137.3
        for <git@vger.kernel.org>; Sat, 02 Aug 2025 18:27:50 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=20230601; t=1754184470; x=1754789270; darn=vger.kernel.org;
        h=content-transfer-encoding:cc:to:subject:message-id:date:from
         :in-reply-to:references:mime-version:from:to:cc:subject:date
         :message-id:reply-to;
        bh=Sis5PnNAfBMlAVeFw8+wnWUKq/SryQ+D5a6Zv1k1rKc=;
        b=XvHkSCYZyuI77e7aI72q1XJOEX6qahmY4YqpTDCkYYhN9aUNlhH7C/YZ4dxlaWNXj+
         ZQfXGKP3to51iTuxMn2JEnJ9Zn9KPqdbcEELaLRDJAjJVMzklzvryBnm6EHc9gM4BVQt
         RyKGViOaVGQ5goZ4O08VK1+uflKGLpbzXI3KMN9RHoUv7AOY9MDQQ0uMZpfUaGfFMgHl
         Qx+dvyWt7rd3C9aS4RzaNFat5d0wV0oljR2hHlseyRu6dnMqNJPqGrX2MVz0+bgUR5wd
         G60/qXwddcfg0I6bviOxcr0t5CtKbupivsLh7EAahKqhjdnlM5RQZfXWiSUIdDqgKfrI
         cPwA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20230601; t=1754184470; x=1754789270;
        h=content-transfer-encoding:cc:to:subject:message-id:date:from
         :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc
         :subject:date:message-id:reply-to;
        bh=Sis5PnNAfBMlAVeFw8+wnWUKq/SryQ+D5a6Zv1k1rKc=;
        b=sNFIzoEUBQyu8l6CFpPghZnkE15Oc2v+zMHttwOZq9vsMgLYge+hWiB3STvPvRHoqM
         Ti3AtqYCVr2BLzaWT4lNjHecA7xjax8mC3NjoP0PwkIqdYDZmR84IuSnCruRIfWQF5qp
         LDkH4ZS8iiUQAwk5DDQzgsIVBeitcGWYAu0t8Q7TA3QnC0nhaQHKcjjvsmOqGng/Y/bE
         mARZ/xjYQSZewloPwBosOZuL7aMd82LOTmcXG6WgSor16Y5w3ZMkVP5BvBqFF7iBKJ5I
         jbcuQjZCfOMFc/Bllh6n8eUawCgGI9gKEwfse8QlrNnRpDl0VmOYIOWgb9XFmgh8byQI
         n+dg==
X-Gm-Message-State: AOJu0YzX/J+BphsnXzarTDhCxVwpn9jSoFIFOuQbeBAirZBhLvUB/8p+
	pCR6j5GhFM3VBL6pMDJWUG0Sy7UmokedxehoJVtqSmaP117Blg32R4X3n098SXqmg5+gYb1aUf2
	kzkNYOaPw77FjzGkXmcmYkrD9aaQC3Og=
X-Gm-Gg: ASbGncu2A6TS6TTCMz7HvCE5YJVcjRlBUksdCt422kPo6d+l77QEnYCCMkUzARIGmdp
	7AUzaWv4ixC8Srj0M1VNciumYu46Hi0w5uCmze600QKF3uEsbI9V6/Sw/8c7Luw5cm2j+D/kVq9
	t7OSl6jkhvrfFITQUvSCMDFTM6yRrXbrloL8GP9QP6lLHDSehNs9D/92KMnnPWWEuald1j0LZvs
	E45c9k=
X-Google-Smtp-Source: AGHT+IGJucIg2+cNlGaAx38ai1KqWuRSdCuWJwiqFY5129nVVlTXEPxMqePVLMQK2DcU4ptmTUY9YTONQGOAhISDj5c=
X-Received: by 2002:a05:6102:5090:b0:4e5:fe5e:2be4 with SMTP id
 ada2fe7eead31-4fdc40131b8mr1646874137.22.1754184469867; Sat, 02 Aug 2025
 18:27:49 -0700 (PDT)
Precedence: bulk
X-Mailing-List: git@vger.kernel.org
List-Id: <git.vger.kernel.org>
List-Subscribe: <mailto:git+subscribe@vger.kernel.org>
List-Unsubscribe: <mailto:git+unsubscribe@vger.kernel.org>
MIME-Version: 1.0
References: <xmqqcya63cqx.fsf@gitster.g> <20250721115519.140361-1-usmanakinyemi202@gmail.com>
 <20250721115519.140361-2-usmanakinyemi202@gmail.com> <CALnO6CCN0HUXJVYmvAJO3EoQQZzHVjE0P=g+AUc9c5Ti0Rcm2w@mail.gmail.com>
 <CALnO6CAPBsxg=-aXVUUJSKrPLWWPLGdEM=k5J=GVoh5fVTAhYQ@mail.gmail.com>
In-Reply-To: <CALnO6CAPBsxg=-aXVUUJSKrPLWWPLGdEM=k5J=GVoh5fVTAhYQ@mail.gmail.com>
From: Usman Akinyemi <usmanakinyemi202@gmail.com>
Date: Sun, 3 Aug 2025 06:57:38 +0530
X-Gm-Features: Ac12FXzjss-dXvJAsCXmDyyCvanR1JNurvBGNuei4JDnItUYZg_GDVf0NuQHr54
Message-ID: <CAPSxiM978fqvC_TO8fKQrx=S4yPEkp3ZufTq+zv+Ws7zJx6yDg@mail.gmail.com>
Subject: Re: [PATCH v4 1/2] t/t1517: automate `git subcmd -h` tests outside a repository
To: "D. Ben Knoble" <ben.knoble@gmail.com>
Cc: git@vger.kernel.org, gitster@pobox.com, chriscool@tuxfamily.org, 
	christian.couder@gmail.com, me@ttaylorr.com, ps@pks.im
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

> > Hm=E2=80=94if we strip the suffix with ${cmd%.*}, do we need a p4.py pa=
ttern
> > too? Actually, at first I wondered why we need to strip the suffix at
> > all. My local Git produces only unsuffixed commands. But
> > bin-wrappers/git produces both p4 and p4.py; request-pull and
> > request-pull.sh; and several others. So I think stripping is probably
> > right, just drop the .py pattern.
>
> I think that using "instaweb.sh" instead of "instaweb" also causes
> this to fail on Windows, like:
>
> https://github.com/benknoble/git/actions/runs/16695826272/job/47259908953
I think this is expected breakage. Removing ".sh" makes the #TODO to pass.
>
> --
> D. Ben Knoble

From mboxrd@z Thu Jan  1 00:00:00 1970
Received: from mail-pf1-f177.google.com (mail-pf1-f177.google.com [209.85.210.177])
	(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
	(No client certificate requested)
	by smtp.subspace.kernel.org (Postfix) with ESMTPS id B3DBB2E36EB
	for <git@vger.kernel.org>; Sun,  3 Aug 2025 02:07:51 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.177
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
	t=1754186873; cv=none; b=G+4LM1kYIH/ch10VMV3pCbDcSL8V/+YxmdwwBCrxmZeqWDPybh7CZxSuKO0BBW1oPiIhTgEIJTArBPZPk/IADV9yYNYhSU6/KX2AasrCvkaVfXHHlEdtpDYh0tJKO4QL1rkJweCrtQIF5SCLLGZ7ZFC5T4/wBPE68ygRdy90n2A=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
	s=arc-20240116; t=1754186873; c=relaxed/simple;
	bh=x1CVyb40Uaj/CVEgTkOx5RtlQ4VWuE+hQdmz1uSlU98=;
	h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References:
	 MIME-Version; b=U0ECIfOB6gyE8UkaAi3o5bLbweSY2Qa2ITUldXNu7t3aVbMQc/tJDD5N5MlZtZQmLozMJ106Ev2mpEzyTEFkEw6rHh6ZcwYkhHjvdXUFuNRt2RwzG2r3YyKFdbdIH133wZMjY7V3Yof6yS5kdCLj/mw7kB1WJIpCNx25m/q+xmU=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=L3G3w0tg; arc=none smtp.client-ip=209.85.210.177
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.b="L3G3w0tg"
Received: by mail-pf1-f177.google.com with SMTP id d2e1a72fcca58-76b8d289f73so2254579b3a.1
        for <git@vger.kernel.org>; Sat, 02 Aug 2025 19:07:51 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=20230601; t=1754186871; x=1754791671; darn=vger.kernel.org;
        h=content-transfer-encoding:mime-version:references:in-reply-to
         :message-id:date:subject:cc:to:from:from:to:cc:subject:date
         :message-id:reply-to;
        bh=Q7lhR6EM6xoW9EUQo8qHhSA+OtttRzMRjCewQT1kCjc=;
        b=L3G3w0tgrJPnwhvY8nYwMDQb0gmf8+ea5dIb44RnHJl1mTPiajkcQZ/6qOa3FgNkb/
         5JvPus5ZxY1iS7ZByruXDfFZecZEa5V2HTCgh84KDH9MdYVXhAsHzHDNUZ7i1C+9uCrQ
         U6STHLvo+h16r/zMKiFDGKnF8PWS7i0wl+3+t0nyfU/HPvJ/9WmPHrKNw/unVgrvnXPM
         AGX5q30vcRQo2syBR62ZJl5b9NMrWiu4t0j93IwU/M343CFE6B59q25VtDGX5Rvfn3KE
         nB6LuD6iSYuaOasncYckJjAedMD+YTzysv6/Lvp25U4MoHwHn70/Xk8VnWv9J0lT2buY
         sd4A==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20230601; t=1754186871; x=1754791671;
        h=content-transfer-encoding:mime-version:references:in-reply-to
         :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc
         :subject:date:message-id:reply-to;
        bh=Q7lhR6EM6xoW9EUQo8qHhSA+OtttRzMRjCewQT1kCjc=;
        b=WS/8nVc4IBNMA6gXY5OCOzqFkYFrSozJf0O8nG8tFfWjquQkjBkeGUkuz2ixtz18PC
         TDPr9kTxF5ZnPM00tgMmef3MeTJ+gj+bcchjEeLsebmOzYSWPDJIP8Ag3ga/Bw7xB8PU
         kHzoZ3IhA0bGsOIawxFfV02WOSG9Ijs8YmysGcWMaFs0GJhDVJE5GIHuJ1OcQfj+r/M+
         3NiTgB2PpSu1SnTiYUTXQDBgrjoqPUG6q/CZZf7N3NecaMObc+VJ0b7V9mFkejLT/WzG
         l+SKJCV5DhkioV2hgsMl5g/c86awGY33bP87zesdBvAYFeN8VXG9WrR4XbtDb1ouAiJz
         kYDw==
X-Forwarded-Encrypted: i=1; AJvYcCUXyPxynMMUP4uepUKdMb04rTvo/8jnirdOLFdZXiA2KycYQpdaNoSueL/ciYTifb80ejc=@vger.kernel.org
X-Gm-Message-State: AOJu0YwZ0f4ePx9RIfTj2tcGjp3QqJ5lPg1G2izkZQIIQzz+JvciYUii
	oCfwa5aAYWB5Yj6C5eTW6tOFrmZa3R7V+D5ShbmhQu7/HAXoA506I1Jh
X-Gm-Gg: ASbGncvmHKckxdYX9HijS9mDeLwybnxRtJfE+Um9pvCAqRC42LtTV7+0HMSF6Hd20ea
	1F7n5aenkj7pnvu5a+xegIYPM9ab0i/wgh9EEh5SAWRUZMelzgmkNWJDK449Mn04Yu+RgwEiP2w
	jgyGZPi2B360QqKrkuCPifFZHFgpV6xy15I0O5hnFtnro89HJu3JpWIGG4BgIbFmfqiuzpv4eXc
	v2PN4iT7prpx5NASlMBU2dYTsLAziV/4BWCJGpFniwWkKZCJhsM18jG7t/SEQdezsTi/mnU82Wu
	dNVyGDCEEvvJIFOBN0acxuyrzrwHOtoYn3mwcsco0M1S/o99oM5EMXRzXqTWvWDvtnsPyUPUmGV
	OUH5QkkY9wJ/4XLklgnOmLCbKKbPYTuFdcQXiRx3QGvMbNxj1fwQ=
X-Google-Smtp-Source: AGHT+IE5qqjCKdfMRVzbfqzJzlF84ZlvaMnpp00ApCROwXz9+9yLqQkb4gWtXf7B1Llin2r/pP16Cw==
X-Received: by 2002:a05:6a20:3d8c:b0:220:631c:e090 with SMTP id adf61e73a8af0-23df8d498e8mr7833151637.0.1754186870760;
        Sat, 02 Aug 2025 19:07:50 -0700 (PDT)
Received: from archlinux.tail6959dd.ts.net ([202.164.41.66])
        by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-b422b77f530sm6466535a12.1.2025.08.02.19.07.47
        (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
        Sat, 02 Aug 2025 19:07:50 -0700 (PDT)
From: Usman Akinyemi <usmanakinyemi202@gmail.com>
To: ben.knoble@gmail.com,
	git@vger.kernel.org
Cc: chriscool@tuxfamily.org,
	christian.couder@gmail.com,
	gitster@pobox.com,
	me@ttaylorr.com,
	ps@pks.im
Subject: [PATCH V5 0/3] refactor t1517 to focus on help output outside a repository
Date: Sun,  3 Aug 2025 07:37:41 +0530
Message-ID: <20250803020744.1037392-1-usmanakinyemi202@gmail.com>
X-Mailer: git-send-email 2.50.1
In-Reply-To: <20250721115519.140361-1-usmanakinyemi202@gmail.com>
References: <20250721115519.140361-1-usmanakinyemi202@gmail.com>
Precedence: bulk
X-Mailing-List: git@vger.kernel.org
List-Id: <git.vger.kernel.org>
List-Subscribe: <mailto:git+subscribe@vger.kernel.org>
List-Unsubscribe: <mailto:git+unsubscribe@vger.kernel.org>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit

This series refactors t1517-outside-repo.sh to focus on testing
`git subcmd -h` outside a Git repository. It does two things:

  1. Moves the existing `update-server-info -h` test to t5200, since it
     tests behavior *inside* a repo and belongs with other update-server-info
     tests.
  
  2. Introduces a loop in t1517 that automatically verifies `-h` output
     for all main Git subcommands when run outside a repository, using
     the `nongit` helper and `git --list-cmds=main`.

This makes t1517 easier to maintain and ensures that new commands are
automatically covered for this class of behavior.


Changes since v4:
  - Changes the approach from having the t1517 to test
  both help outside and inside repo to just having inside repo.
  - Drop spurious message during test 
  - Fix known breakages that actually work
  - Fix new t5200 by removing the trailing &&
  - Move the `prune -h` test to t5304

Usman Akinyemi (3):
  t/t1517: automate `git subcmd -h` tests outside a repository
  t5200: move `update-server-info -h` test from t1517
  t5304: move `prune -h` test from t1517

 t/t1517-outside-repo.sh       | 34 +++++++++++++++++++++-------------
 t/t5200-update-server-info.sh |  5 +++++
 t/t5304-prune.sh              |  5 +++++
 3 files changed, 31 insertions(+), 13 deletions(-)

Range-diff against v2:

1:  11eb3e7bfe < -:  ---------- t/t1517: automate `git subcmd -h` tests outside a repository
-:  ---------- > 1:  75a1d540e4 t/t1517: automate `git subcmd -h` tests outside a repository
2:  5cf43192d0 ! 2:  8c028256a0 t5200: move `update-server-info -h` test from t1517
    @@ t/t1517-outside-repo.sh: test_expect_success LIBCURL 'remote-http outside reposi
      
     -test_expect_success 'update-server-info does not crash with -h' '
     -	test_expect_code 129 git update-server-info -h >usage &&
    --	test_grep "[Uu]sage: git update-server-info " usage &&
    +-	test_grep "[Uu]sage: git update-server-info " usage
     -'
     -
    + test_expect_success 'prune does not crash with -h' '
    + 	test_expect_code 129 git prune -h >usage &&
    + 	test_grep "[Uu]sage: git prune " usage &&
    + 	test_expect_code 129 nongit git prune -h >usage &&
    + 	test_grep "[Uu]sage: git prune " usage
    + '
    ++
      for cmd in $(git --list-cmds=main)
      do
      	cmd=${cmd%.*} # strip .sh, .perl, etc.
    @@ t/t5200-update-server-info.sh: test_expect_success 'midx does not create duplica
      
     +test_expect_success 'update-server-info does not crash with -h' '
     +	test_expect_code 129 git update-server-info -h >usage &&
    -+	test_grep "[Uu]sage: git update-server-info " usage &&
    ++	test_grep "[Uu]sage: git update-server-info " usage
     +'
     +
      test_done
-:  ---------- > 3:  c1cdbf272f t5304: move `prune -h` test from t1517
-- 
2.50.1


From mboxrd@z Thu Jan  1 00:00:00 1970
Received: from mail-pf1-f180.google.com (mail-pf1-f180.google.com [209.85.210.180])
	(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
	(No client certificate requested)
	by smtp.subspace.kernel.org (Postfix) with ESMTPS id 17FD82E36EB
	for <git@vger.kernel.org>; Sun,  3 Aug 2025 02:07:54 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.180
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
	t=1754186876; cv=none; b=S+jv6RzjzbhVI0UEOUHkE31gFEOzYUwpiNAPiquJ1wQHfBNPr6DfpToaxSup532nSLrMrCpXxqsjY9m7WDmV1E6j3Dd1vNtxqumG/t1y1VBk5Np5nCdLfjV8nni9KUIFqu0llEtsr0Rt0k1WECxSwC9wQDhDrx3uj8u3WaIUAtI=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
	s=arc-20240116; t=1754186876; c=relaxed/simple;
	bh=gw4fAzRBqrtBI0A5pjd0NpY5Yyhx5PKg54U3lCVqVQ8=;
	h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References:
	 MIME-Version; b=XuepgQmGVtYuOO/zeoRBP/8xpDvYS4YDUhdnJHXvU98Q4/m0/p+9+sZTpV3HimLsMN3bDAiM8FRYvfEBwk9l2r977iQQtSFTOSAdPse2uyVpyDtLENFG/FNrhApFkvJCqGVAAZftg1S3oR+MaoL6lP2flEBXQLWU+fWULGHBf60=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=DIyN34Rr; arc=none smtp.client-ip=209.85.210.180
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.b="DIyN34Rr"
Received: by mail-pf1-f180.google.com with SMTP id d2e1a72fcca58-76bc68cc9e4so2770074b3a.2
        for <git@vger.kernel.org>; Sat, 02 Aug 2025 19:07:54 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=20230601; t=1754186874; x=1754791674; darn=vger.kernel.org;
        h=content-transfer-encoding:mime-version:references:in-reply-to
         :message-id:date:subject:cc:to:from:from:to:cc:subject:date
         :message-id:reply-to;
        bh=AW8XK2E3rm2gDM4ORwq+1xeD9iq/zZUlZbhAjIlAN1k=;
        b=DIyN34RrEErSDoyZNq0hQw70mthu76SxFYL1h/9S7lsZuAjVwccpBtsjNArqE/nMnE
         yukDKMnBxAe3Cvn0i/9t23b5eAQHplgECy/WErQFkXYTsAlIIJVIGr534VUZdG5CS1r2
         JCCNUoNcOpa7bGe+IvNgA5fXC/GBw2BXEGOTqW5M6dCF7nS0nZnrvG8YdVdg8LfXUB2R
         IhlULcNRYc6JnpYeeuQBXFi+MZ7wxLThOwfebteg/F4iKqFFL1RXdC6chcoIJuL0TQF2
         sK2Ne9W7R0FvMajixySoWXhpB43ly8/PlNKCRYxQhB2McA4YszAbFlU45d8mSWeXuDSw
         GC3g==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20230601; t=1754186874; x=1754791674;
        h=content-transfer-encoding:mime-version:references:in-reply-to
         :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc
         :subject:date:message-id:reply-to;
        bh=AW8XK2E3rm2gDM4ORwq+1xeD9iq/zZUlZbhAjIlAN1k=;
        b=v4mas7iWctSaz++PG8Kh/641FnTly+ZjHgGoG7e8P0tZMLLNGlV+80hUrK/DQCi5Q/
         nDJSdJnx1P4gQPbZbcglsHMVwXM8uarf4Kf2bjLS5QNGFY2qP624p4BMA0Y0RWyStPRY
         LIRffpSoF0i01bd9vCn+Z9Z54vGVPtKwRnNNjmzx2Dakh0vBBZ8mzhFoeWRZjhuitiSM
         Bt4Ts8tOcyngsE8M2mvyVm8o/3HlL57LqmvBh+64cI+KjWA/KIlJpFbY6s5R8djr9Fkk
         JKlUhP/apJ8FcI5twE2yZiVgBeprRAdvOcxcYjIeqj4a4v+MyWvJ0XaTo5qpq/VgiLDq
         MMNg==
X-Forwarded-Encrypted: i=1; AJvYcCU4RxH/q39eU/owjZErdPUULve8Vcr6Upv17osxE71ANwTT0r1IQ7GNeojU5xvx3a48X5k=@vger.kernel.org
X-Gm-Message-State: AOJu0YxY7eYZbDVEyLA/E5yMpIZVk3GlSiErcIxD1kkBlTx6It2wpnot
	hpxakqiS3UW4x0e4SbPPdBDAtZrMHQ/IXIvY94fEYHJx4G18PvgZf9VZ
X-Gm-Gg: ASbGncu39s9DI6wvsnmhdALdJyxOrueOfXpDulhbsVoY8iuE1P6NLJGg7ORj921LTR7
	D1Qm2/Df00XH4bGyvFs4QpEIDQKNMt/YutwKWe/6MxB9zSGHMJrvBuY08nzhFnSx/RBaMZNhknd
	oPhy9RHX2FWTutEokW3D/N5EeBCUGvGraWNEPk2htuztIW66t4GR87N1LbpA/uJ0+ipKzjCUFn+
	gEesK/duYStYWx9suPrmhv58tbd7UKGfXgHRS7IGiOw8t3pIk66lNCtJ6jV29WeBsKenPVWltX0
	YTtcmWyULXwx1rtPcS64G7wf3Ai5HfOIPsamIvese9a5hTN2tkD4mA3KTlYKThsOSC2Ly9yPOyW
	n6Bc83jXvdXYqjmebdrpIfZjZXDb7QYc5gzgR/1lHBiPB+j5o7TQ=
X-Google-Smtp-Source: AGHT+IEBTBqf+gzHKt9J89A2AVxJcT5o+ff9a5saET9vzIeHXLb+EpQkDj2DhTXPQNoGvVTG52ktXg==
X-Received: by 2002:a05:6a21:3297:b0:23d:dad9:50d1 with SMTP id adf61e73a8af0-23df8f94a3cmr7391002637.7.1754186874290;
        Sat, 02 Aug 2025 19:07:54 -0700 (PDT)
Received: from archlinux.tail6959dd.ts.net ([202.164.41.66])
        by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-b422b77f530sm6466535a12.1.2025.08.02.19.07.51
        (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
        Sat, 02 Aug 2025 19:07:53 -0700 (PDT)
From: Usman Akinyemi <usmanakinyemi202@gmail.com>
To: ben.knoble@gmail.com,
	git@vger.kernel.org
Cc: chriscool@tuxfamily.org,
	christian.couder@gmail.com,
	gitster@pobox.com,
	me@ttaylorr.com,
	ps@pks.im,
	"D. Ben Knoble" <ben.knoble+github@gmail.com>
Subject: [PATCH V5 1/3] t/t1517: automate `git subcmd -h` tests outside a repository
Date: Sun,  3 Aug 2025 07:37:42 +0530
Message-ID: <20250803020744.1037392-2-usmanakinyemi202@gmail.com>
X-Mailer: git-send-email 2.50.1
In-Reply-To: <20250803020744.1037392-1-usmanakinyemi202@gmail.com>
References: <20250721115519.140361-1-usmanakinyemi202@gmail.com>
 <20250803020744.1037392-1-usmanakinyemi202@gmail.com>
Precedence: bulk
X-Mailing-List: git@vger.kernel.org
List-Id: <git.vger.kernel.org>
List-Subscribe: <mailto:git+subscribe@vger.kernel.org>
List-Unsubscribe: <mailto:git+unsubscribe@vger.kernel.org>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit

Replace manual `-h` tests with a loop over all subcommands using
`git --list-cmds=main`. This ensures consistent coverage of `-h`
behavior outside a repo and future-proofs the test by covering
new commands automatically.

Known exceptions are skipped or marked as expected failures.

Suggested-by: Patrick Steinhardt <ps@pks.im>
Helped-by: Junio C Hamano <gitster@pobox.com>
Helped-by: D. Ben Knoble <ben.knoble+github@gmail.com>
Signed-off-by: Usman Akinyemi <usmanakinyemi202@gmail.com>
---
 t/t1517-outside-repo.sh | 23 +++++++++++++++++++++--
 1 file changed, 21 insertions(+), 2 deletions(-)

diff --git a/t/t1517-outside-repo.sh b/t/t1517-outside-repo.sh
index 8f59b867f2..4a827b96f0 100755
--- a/t/t1517-outside-repo.sh
+++ b/t/t1517-outside-repo.sh
@@ -109,8 +109,6 @@ test_expect_success LIBCURL 'remote-http outside repository' '
 
 test_expect_success 'update-server-info does not crash with -h' '
 	test_expect_code 129 git update-server-info -h >usage &&
-	test_grep "[Uu]sage: git update-server-info " usage &&
-	test_expect_code 129 nongit git update-server-info -h >usage &&
 	test_grep "[Uu]sage: git update-server-info " usage
 '
 
@@ -120,5 +118,26 @@ test_expect_success 'prune does not crash with -h' '
 	test_expect_code 129 nongit git prune -h >usage &&
 	test_grep "[Uu]sage: git prune " usage
 '
+for cmd in $(git --list-cmds=main)
+do
+	cmd=${cmd%.*} # strip .sh, .perl, etc.
+	case "$cmd" in
+	archimport | cvsexportcommit | cvsimport | cvsserver | daemon | \
+	difftool--helper | filter-branch | fsck-objects | get-tar-commit-id | \
+	http-backend | http-fetch | http-push | init-db | \
+	merge-octopus | merge-one-file | merge-resolve | mergetool | \
+	mktag | p4 | p4.py | pickaxe | remote-ftp | remote-ftps | \
+	remote-http | remote-https | replay | send-email | \
+	sh-i18n--envsubst | shell | show | stage | submodule | svn | \
+	upload-archive--writer | upload-pack | web--browse | whatchanged)
+		expect_outcome=expect_failure ;;
+	*)
+		expect_outcome=expect_success ;;
+	esac
+	test_$expect_outcome "'git $cmd -h' outside a repository" '
+		test_expect_code 129 nongit git $cmd -h >usage &&
+		test_grep "[Uu]sage: git $cmd " usage
+	'
+done
 
 test_done
-- 
2.50.1


From mboxrd@z Thu Jan  1 00:00:00 1970
Received: from mail-pf1-f175.google.com (mail-pf1-f175.google.com [209.85.210.175])
	(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
	(No client certificate requested)
	by smtp.subspace.kernel.org (Postfix) with ESMTPS id 1EB942E36EB
	for <git@vger.kernel.org>; Sun,  3 Aug 2025 02:07:57 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.175
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
	t=1754186879; cv=none; b=HnpALWTi/HnO8JECopDNqqpqmskMkgTg1zc64VOhaZQ4XqU0AaJRxbt6GOVDVwzGrKY1cu/Cey7nIr2Dk2nf8DgdpLT2FAWGI85PkHTTkTXFuqxlWZh/I9IIXVB2oAWiLGzUReyL20NFwQ/SathSc+jUMWpWc6b+CmnKF0NEzkg=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
	s=arc-20240116; t=1754186879; c=relaxed/simple;
	bh=20XzMBMTmgqm51DL1Ul97aGUhfPz8N0JThCXaEms4uc=;
	h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References:
	 MIME-Version; b=MmTDzIxxpz3v9ZC9L6FNYT5Ng0uk7h0Hm0xEqIhNsdYg2RIo5tHDsG34JW1NTiysJm0ZX/WDxAJx2lVbEFnuxzQZhrG5E/9uZ3rMctbgo7bgHlLSacEyZtN0hS/KgvUEb5Q4zGc0bU29sNppDPEbN4rggEpWHASMONR5MKJBx+I=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=dbBzBhHo; arc=none smtp.client-ip=209.85.210.175
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.b="dbBzBhHo"
Received: by mail-pf1-f175.google.com with SMTP id d2e1a72fcca58-76aea119891so3975542b3a.1
        for <git@vger.kernel.org>; Sat, 02 Aug 2025 19:07:57 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=20230601; t=1754186877; x=1754791677; darn=vger.kernel.org;
        h=content-transfer-encoding:mime-version:references:in-reply-to
         :message-id:date:subject:cc:to:from:from:to:cc:subject:date
         :message-id:reply-to;
        bh=V7vOveSQq6KyRX02Ut/GY43bicdHBegEmWfe1V6fTN8=;
        b=dbBzBhHocxuY2lYcGrVkFOggfhiCfTPSwzqQO9P7wUNFxTp39CwfRO2HXRfoSDOYek
         o6ZAXutvVSNrRlnjyD0PBhitMDJ9VYPJzUrfX0aqEic4DpJXjtgotYskKZqlSugEbiZN
         YJvygiZUVj/PdRTm1Okc7PZL9zSCYs/teW0Bva8MfbKslO0V47USp0TkLmJXz2AgRCTD
         23aD8zNlRIau9ZNNM94JKn4gp8VSszLjoHJX8yIb+2cuNeS+VOT7cHv0eMZsXhIU+/BJ
         aUsQEScg52DXb/1wd0ELZKomU1upECjTkQqsqau5PHl0M1ZvkJaYUxUCCLuitKpAosZB
         U+CA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20230601; t=1754186877; x=1754791677;
        h=content-transfer-encoding:mime-version:references:in-reply-to
         :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc
         :subject:date:message-id:reply-to;
        bh=V7vOveSQq6KyRX02Ut/GY43bicdHBegEmWfe1V6fTN8=;
        b=mOcRBkk6LRnBtSGfghSWrzvcsAihWDSHPPa4CQ+0xWekpGtMgmSeKlqnhD+ePz7igD
         3HKtHMRya+RESoJAouwZrxS+usbmprjMxV9rcK9fmTwbEOvhnZs6jfKubkbT2m07tTQp
         mamlPxMUu1h0AmR2GqsryJfiEhwSJT37jr04Q+KSgR6tSowsdM+B5i8dUp2a8eo2cWzV
         E2gzgMXPgdzDTMwRGQ7QHZQx3UqysRvMXAleDMgG4N6nQnbYRQXK39KVearXDWr99vy8
         upXHzLYB7kucLqv0eY8sUQo8LUhJEp/5X20943yN2b0kL1hxqLAsohNQAUHvoXqgqeoL
         2c1Q==
X-Forwarded-Encrypted: i=1; AJvYcCU2Ahxm9j0UcHfmIy+2zCuT0+d+0JIp20VocSa3xSKNUiFc45bl3WdXHAOjUzCAKPKIpes=@vger.kernel.org
X-Gm-Message-State: AOJu0YycBOkf0q8wurrQPNk8TrIFOI0Y90zNKR2Q8xNgjuTiZWvPOy9A
	N+9lqkt5OphU+0ToKo8yObqquoaH2dclS0Xyq7zdgkh3ZBotMvh+Sg24AsD7vIlpYxk=
X-Gm-Gg: ASbGncsY5De1Ub82ktzWQi/bUWsamZ4YQH/+Qe4gGx5ALKqBuT6lHijT+/tgof7ifk4
	G31cC5caKjR+Xo+EkV8CL6d+JAKLkYZdrrthyRlKIyXejZmxP6+3w2US0/hGg5NIimeNkypfYaV
	cYCAMIDc04yRKzdYY2aRgD37VC3bd8zVlXuJuiFBgLPz1CQ3BHNhaSsP5mS9d9yJ9q82b+8KBDV
	Ux+FIV9DNGqub5EaSR1izdcDGXSp36x9Qu670JTnLuiEj49xp2vO1bJJ1tehFN544G1c9SfHLWf
	4TDp7jNZC12MUt+UwL1F9M9H2jtoOWv0j5BFHxn7RBd3R04SobAe6GeEV0vdfrZov5x0uW59wA0
	y7PcdsyawroYmgJsmicfKih3FsIAuNJGkqXhGda0p2dFBDvGd3WI=
X-Google-Smtp-Source: AGHT+IHBFigLkZVvFZ3g+7wZG9qEhqlrWn2ETl0vUqGHWhO97LySnibfDTklaBE29WNrlcz59POI3w==
X-Received: by 2002:a05:6a20:2443:b0:225:9ac1:7c6b with SMTP id adf61e73a8af0-23dd7ab0b0fmr20646941637.4.1754186877343;
        Sat, 02 Aug 2025 19:07:57 -0700 (PDT)
Received: from archlinux.tail6959dd.ts.net ([202.164.41.66])
        by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-b422b77f530sm6466535a12.1.2025.08.02.19.07.54
        (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
        Sat, 02 Aug 2025 19:07:57 -0700 (PDT)
From: Usman Akinyemi <usmanakinyemi202@gmail.com>
To: ben.knoble@gmail.com,
	git@vger.kernel.org
Cc: chriscool@tuxfamily.org,
	christian.couder@gmail.com,
	gitster@pobox.com,
	me@ttaylorr.com,
	ps@pks.im
Subject: [PATCH V5 2/3] t5200: move `update-server-info -h` test from t1517
Date: Sun,  3 Aug 2025 07:37:43 +0530
Message-ID: <20250803020744.1037392-3-usmanakinyemi202@gmail.com>
X-Mailer: git-send-email 2.50.1
In-Reply-To: <20250803020744.1037392-1-usmanakinyemi202@gmail.com>
References: <20250721115519.140361-1-usmanakinyemi202@gmail.com>
 <20250803020744.1037392-1-usmanakinyemi202@gmail.com>
Precedence: bulk
X-Mailing-List: git@vger.kernel.org
List-Id: <git.vger.kernel.org>
List-Subscribe: <mailto:git+subscribe@vger.kernel.org>
List-Unsubscribe: <mailto:git+unsubscribe@vger.kernel.org>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit

t1517 is now focused on testing subcommands outside a repository.
Move the in-repo `-h` test for `update-server-info` to t5200,
which covers this command.

Suggested-by: Patrick Steinhardt <ps@pks.im>
Helped-by: Junio C Hamano <gitster@pobox.com>
Signed-off-by: Usman Akinyemi <usmanakinyemi202@gmail.com>
---
 t/t1517-outside-repo.sh       | 6 +-----
 t/t5200-update-server-info.sh | 5 +++++
 2 files changed, 6 insertions(+), 5 deletions(-)

diff --git a/t/t1517-outside-repo.sh b/t/t1517-outside-repo.sh
index 4a827b96f0..3623272db3 100755
--- a/t/t1517-outside-repo.sh
+++ b/t/t1517-outside-repo.sh
@@ -107,17 +107,13 @@ test_expect_success LIBCURL 'remote-http outside repository' '
 	test_grep "^error: remote-curl" actual
 '
 
-test_expect_success 'update-server-info does not crash with -h' '
-	test_expect_code 129 git update-server-info -h >usage &&
-	test_grep "[Uu]sage: git update-server-info " usage
-'
-
 test_expect_success 'prune does not crash with -h' '
 	test_expect_code 129 git prune -h >usage &&
 	test_grep "[Uu]sage: git prune " usage &&
 	test_expect_code 129 nongit git prune -h >usage &&
 	test_grep "[Uu]sage: git prune " usage
 '
+
 for cmd in $(git --list-cmds=main)
 do
 	cmd=${cmd%.*} # strip .sh, .perl, etc.
diff --git a/t/t5200-update-server-info.sh b/t/t5200-update-server-info.sh
index 8365907055..a551e955b5 100755
--- a/t/t5200-update-server-info.sh
+++ b/t/t5200-update-server-info.sh
@@ -46,4 +46,9 @@ test_expect_success 'midx does not create duplicate pack entries' '
 	test_must_be_empty dups
 '
 
+test_expect_success 'update-server-info does not crash with -h' '
+	test_expect_code 129 git update-server-info -h >usage &&
+	test_grep "[Uu]sage: git update-server-info " usage
+'
+
 test_done
-- 
2.50.1


From mboxrd@z Thu Jan  1 00:00:00 1970
Received: from mail-pg1-f182.google.com (mail-pg1-f182.google.com [209.85.215.182])
	(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
	(No client certificate requested)
	by smtp.subspace.kernel.org (Postfix) with ESMTPS id 2BEAA2E36EB
	for <git@vger.kernel.org>; Sun,  3 Aug 2025 02:08:01 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.215.182
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
	t=1754186882; cv=none; b=JbwWhSXm6t9PuFfKJ7daFTtehbkiOFVez4/bhfZmx0cJSi71naliP36R94Ml90aS4b0dFMv9TLjjnovogR7Oqfl2QT+3K/zx6SEPmMgHOyxdFuDZKmK3CVAUkrD01BCFyyCjGzB+tPEGui1MIoQNUKAOi4De+/E0MTSMUyqyKRI=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
	s=arc-20240116; t=1754186882; c=relaxed/simple;
	bh=+yAH69ZIVDoKxXEKJWgz3fhWv3yXkTNhUAhXLctVnIE=;
	h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References:
	 MIME-Version; b=iWhK5Xe7eG7VTo9dpk6g2SJ7MC1gA+evad6CIwcBdS12qEImdJKUvM4b966qzohmAgb50ZZ/cQE1lMjhzeRNnnZ7Kz6mmFHJqJ2gtbeE1V71F03t0alGHRtF3FG4q4TF8xYXGLyQj/Zpc6grurMQBgHbtxy4GYbJqB1Tuddd5/Y=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=T6mmOGey; arc=none smtp.client-ip=209.85.215.182
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.b="T6mmOGey"
Received: by mail-pg1-f182.google.com with SMTP id 41be03b00d2f7-b3be5c0eb99so2362903a12.1
        for <git@vger.kernel.org>; Sat, 02 Aug 2025 19:08:01 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=20230601; t=1754186880; x=1754791680; darn=vger.kernel.org;
        h=content-transfer-encoding:mime-version:references:in-reply-to
         :message-id:date:subject:cc:to:from:from:to:cc:subject:date
         :message-id:reply-to;
        bh=U14jUZdhne3ROsFbLbAz2oA+yLNeEuPayA4YtT/Rh9o=;
        b=T6mmOGeybeBLvD4wNFobZIKijSP7w+RnSDcTKnbBxEu0ocAeRyC7vO6wbCz/1f9O4i
         01jYMi+y+MyvvfkEVrn+Ol+N1YhpqK+KnUAOZS03IyiwZ7BrfdSkEwBCe5KxwJFLwGBz
         o//S1PsXSPtCos37gL7WRqvRL3nCa9cywS6M87uyk5xcS1KJXlveqcebIp2bpmvg6wX3
         de0WpUMajwOYirA9jErQpK8KlIS+WMXMKX78IopmkH0OVHjdzinG/57Al9CtO19SPAvq
         fhmro4wbqdQDtFMZ0dFNTUUz9sh5euIVxpoPFKPbhwPieUfR0UcLuD0JoddWiuKrCd3x
         MOgA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20230601; t=1754186880; x=1754791680;
        h=content-transfer-encoding:mime-version:references:in-reply-to
         :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc
         :subject:date:message-id:reply-to;
        bh=U14jUZdhne3ROsFbLbAz2oA+yLNeEuPayA4YtT/Rh9o=;
        b=nUjMJq+SLu52PiF43d2MnuqOtD0vac4CLNYRGNah9txb4qgp0L+l/9cxs4psw88oLe
         65IBvfNYua46BU5aRVXP2rxv3NHFEPSfEGCoRM8Kz6OOhK9XbtfkMEt+/n/NUqfuLNDv
         9ozmt516Zkg9mFOLw/hH9uFIff0i0CfdM6R6kViHixZ25XYY8Bolk6j83NJrhLCjdgSC
         eZYXs7NnbK03VCMh6lyQqAE8OtYVrssjDc1mXdJlG0hHqpRYwYvLZrWLQdMbCMi0Z98w
         W21eGGRjEHuLuQbcfZ7PiNej48aUPe9GD3lRcP5O47DCohRKqzEzsLMac8u6MftUuPSy
         2E3w==
X-Forwarded-Encrypted: i=1; AJvYcCUPXD0yRIlfXpY6YawWrFO3I1qWUpO6bTTXWgbQN282Zw7I//XFgXwaYmhbdVGsWa3GZ14=@vger.kernel.org
X-Gm-Message-State: AOJu0YwsAe6n2N2f/QgZVlqsEm0Tc7PFzpPSHc0q+Wbpp1ccTdVonR0P
	lHagCfYmhCXz8cbdZuYfcHwPpfG5qK8bCRzO+sfMzS6n784IgKsEH3YJ
X-Gm-Gg: ASbGnctUN94omVNmcqIOCHmlV+u4YtNDPpyXXBEI1nEtmgKAyn+cbJyajHmxOKQXgEV
	XJqmo7IriQsdWMh+KDwXXc4p2yCn5Ha0aEKALt46DC5FrBptmxQeFhxJ/VkXj4OOkpBLaojnp7R
	J/ihSoVZFsWo17hj774RR6rpT9Drc03w/2PkUWDMkYu0sbWnGBQ+8Wv52TOgHMpC7BBjGqT0Gsc
	gn+nkn5/wkvT9Y8a5pFQzR4wNO6kSuaLFCoSsYn0OUZcXwoLzTlmQFCe6hnr6O1g8pEPpsr7S4g
	Tf7Rfoq+4a08Z5pegHBDAK8CaCsyd2lOkf6Ex4X6xTiTFkw1QxW9O0f9qjP2Wd1sX83JG7S9oct
	wY+jUjeyBHi7V9t9fwhOLNN0hUHAT/5VEdxzPsKf6H08leFb7IAI=
X-Google-Smtp-Source: AGHT+IHn8XPVPcl5fwmQjvXcx15CZSPLKkltddY4BFXE6SDYVPIzc74dS3DgAVTonZLwo1lC8046SA==
X-Received: by 2002:a17:90b:2e44:b0:31f:32f:3a87 with SMTP id 98e67ed59e1d1-321162b7660mr7193841a91.26.1754186880393;
        Sat, 02 Aug 2025 19:08:00 -0700 (PDT)
Received: from archlinux.tail6959dd.ts.net ([202.164.41.66])
        by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-b422b77f530sm6466535a12.1.2025.08.02.19.07.57
        (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
        Sat, 02 Aug 2025 19:08:00 -0700 (PDT)
From: Usman Akinyemi <usmanakinyemi202@gmail.com>
To: ben.knoble@gmail.com,
	git@vger.kernel.org
Cc: chriscool@tuxfamily.org,
	christian.couder@gmail.com,
	gitster@pobox.com,
	me@ttaylorr.com,
	ps@pks.im
Subject: [PATCH V5 3/3] t5304: move `prune -h` test from t1517
Date: Sun,  3 Aug 2025 07:37:44 +0530
Message-ID: <20250803020744.1037392-4-usmanakinyemi202@gmail.com>
X-Mailer: git-send-email 2.50.1
In-Reply-To: <20250803020744.1037392-1-usmanakinyemi202@gmail.com>
References: <20250721115519.140361-1-usmanakinyemi202@gmail.com>
 <20250803020744.1037392-1-usmanakinyemi202@gmail.com>
Precedence: bulk
X-Mailing-List: git@vger.kernel.org
List-Id: <git.vger.kernel.org>
List-Subscribe: <mailto:git+subscribe@vger.kernel.org>
List-Unsubscribe: <mailto:git+unsubscribe@vger.kernel.org>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit

t1517 is now focused on testing subcommands outside a repository.
Move the in-repo `-h` test for `prune` to t5304, which covers
this command.

Suggested-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Usman Akinyemi <usmanakinyemi202@gmail.com>
---
 t/t1517-outside-repo.sh | 7 -------
 t/t5304-prune.sh        | 5 +++++
 2 files changed, 5 insertions(+), 7 deletions(-)

diff --git a/t/t1517-outside-repo.sh b/t/t1517-outside-repo.sh
index 3623272db3..8a417af47a 100755
--- a/t/t1517-outside-repo.sh
+++ b/t/t1517-outside-repo.sh
@@ -107,13 +107,6 @@ test_expect_success LIBCURL 'remote-http outside repository' '
 	test_grep "^error: remote-curl" actual
 '
 
-test_expect_success 'prune does not crash with -h' '
-	test_expect_code 129 git prune -h >usage &&
-	test_grep "[Uu]sage: git prune " usage &&
-	test_expect_code 129 nongit git prune -h >usage &&
-	test_grep "[Uu]sage: git prune " usage
-'
-
 for cmd in $(git --list-cmds=main)
 do
 	cmd=${cmd%.*} # strip .sh, .perl, etc.
diff --git a/t/t5304-prune.sh b/t/t5304-prune.sh
index 1f1f664871..2be7cd30de 100755
--- a/t/t5304-prune.sh
+++ b/t/t5304-prune.sh
@@ -364,4 +364,9 @@ test_expect_success 'gc.recentObjectsHook' '
 	git cat-file -p $BLOB
 '
 
+test_expect_success 'prune does not crash with -h' '
+	test_expect_code 129 git prune -h >usage &&
+	test_grep "[Uu]sage: git prune " usage
+'
+
 test_done
-- 
2.50.1


From mboxrd@z Thu Jan  1 00:00:00 1970
Received: from mail-ed1-f43.google.com (mail-ed1-f43.google.com [209.85.208.43])
	(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
	(No client certificate requested)
	by smtp.subspace.kernel.org (Postfix) with ESMTPS id DC934139D0A
	for <git@vger.kernel.org>; Sun,  3 Aug 2025 14:53:09 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.43
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
	t=1754232791; cv=none; b=e4hJw3SY2trI5Eu2QgvOo0TuIS/VEPN8EoCMvMvHLVzTByVT9rN5BRgSNkNhVLepeAbC4tKpG+cRTSovC2QbHyXYHhSatwZm01eQ5TFlMKgtIrWqb3aHFiftc0oAsiH84OwFr1UhVjqQLcs1F5TX5gaQLsxLxbzw2UtbwtCJgv8=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
	s=arc-20240116; t=1754232791; c=relaxed/simple;
	bh=1Sl9rlHkTFw3ZAZAr7tQZfGKfE6QGrqyU23dFKDzJQc=;
	h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject:
	 To:Cc:Content-Type; b=OW/CD7/0UQkeMe8i8wQtvdZS6JqQsEA2hYtaMql+QWL12ojCeLNsw2dYOnlZeX6Lsa5gkX4Jh09Obnucc+X3QF30oUoHmbwu5162nIiAO4BMXqSd5BqF1RwwHhaTLj8OlZuaCL9MxM3DdxYGPNTDxHD1BkVaEKBnZquKubthJp8=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=RGn19ikY; arc=none smtp.client-ip=209.85.208.43
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.b="RGn19ikY"
Received: by mail-ed1-f43.google.com with SMTP id 4fb4d7f45d1cf-6154d14d6f6so4835333a12.2
        for <git@vger.kernel.org>; Sun, 03 Aug 2025 07:53:09 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=20230601; t=1754232788; x=1754837588; darn=vger.kernel.org;
        h=content-transfer-encoding:cc:to:subject:message-id:date:from
         :in-reply-to:references:mime-version:from:to:cc:subject:date
         :message-id:reply-to;
        bh=ShKGV/ZD9wS0DnEKEQf/Xly9nSUXvZCUHkO+bX+EPF8=;
        b=RGn19ikYVWQUGIRbyCkTsWiITkBjsJpNVLn6tNZgxL+Yyryro0+9TKZsllPZ0fW6vt
         BME4OEvwrnQ7rgfKVRUbzy39zWfGZbELKs3X4G6lSPKK3FfvIs+uiBjY2YezxHi1gkJR
         h8o9YAniwJdk+IfaEQFPo1THMzrL089Ukc6P3bnIpK1dVr2QBX4vaoBRgF75/eZ37h9o
         f0TAmL+mV2PnTUUFbmimVevgP9WJcytYi4nPtbS5A1GKSM8KKtUs/NEoCmX5BcZbFczM
         CWb/fyMnBCfqJbAl9VbfS9shsW0if324ZkwRlzZNwK513EgZzlamel+opA0OUGj9WC2f
         nzJw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20230601; t=1754232788; x=1754837588;
        h=content-transfer-encoding:cc:to:subject:message-id:date:from
         :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc
         :subject:date:message-id:reply-to;
        bh=ShKGV/ZD9wS0DnEKEQf/Xly9nSUXvZCUHkO+bX+EPF8=;
        b=ceuK5zy68OB1tcQErpJicYHFpfJ7X1nMSy01q9AoNH0VJNvgSSv+QEAxEcEaBMVPjY
         dda0WLWN53g8b4gC7IQ+PO5Ym1Uu5H1tHTAVvrcTffys5d9AdvFo19X1nrS+qbfLBmL3
         C4x3PSne6BE+ucIv8KcKj3LKi8ToJ+2rr9zTTNIx1Oo5Gxvl1Jxgx6te6jvlIK/n5L6X
         49pOm5T7p1l4mepblVr6893GFYbyBMqOqGFCt0ULbVb2oWpOCCsFNeKrSyIDdTkhx1Yn
         sOdR6QfgD2ENBmJKVXJgbFfA979KmW1NdNdtJL+dZcBRZsAfPUyhbiCfF7czG+yE6tI0
         2oZw==
X-Gm-Message-State: AOJu0Yya8EbEiORstGAq6DmV94YGALx6iP8DS87ieooXKxq79prIuW2h
	8xX5GzjY5Wg2+y1WRV1CXlNctobSVO3n3RkpIJXTqT2ntULS6RnlcbV5GfA3Sr1URQLmmUCokrN
	byoGjX9VLNOp+9sAD8eN7Ra1wd0ZbHSgFoR9sc04=
X-Gm-Gg: ASbGncuiaC/L/Zk5e0ge1lx0u8q63VBjSlO/g+Xh915bPBEfcvoK0qWO0F0+iZTY5/Y
	7MpTcdjV9jLzkZ36ZUccdWBLQQEWgNqqULOcD+Uinp5C7LxV04PbhdrgJdvHgNutRUqzKlopRRT
	6ikPpcYYtRxoqB2NmV1AOrkCiWl/vZW1u3J6WR3BHfJV5+G0xUakni+1VeL61Brm3M4hvsVMVOR
	Q2ChhZzioBID1fpKtKVxYKT0UlvArguDXG7JuXE7vAOM46cUgI=
X-Google-Smtp-Source: AGHT+IH8cqmawpE5QNezFEDR7KkKT8po7KwZh2c+pMHlMx0OgInud6jeTeIohuLanamT2fDwZfQZEI9dSYP8tGwODKA=
X-Received: by 2002:a17:907:7245:b0:ad8:9a3b:b26e with SMTP id
 a640c23a62f3a-af94024886bmr673454166b.56.1754232787869; Sun, 03 Aug 2025
 07:53:07 -0700 (PDT)
Precedence: bulk
X-Mailing-List: git@vger.kernel.org
List-Id: <git.vger.kernel.org>
List-Subscribe: <mailto:git+subscribe@vger.kernel.org>
List-Unsubscribe: <mailto:git+unsubscribe@vger.kernel.org>
MIME-Version: 1.0
References: <20250721115519.140361-1-usmanakinyemi202@gmail.com>
 <20250803020744.1037392-1-usmanakinyemi202@gmail.com> <20250803020744.1037392-2-usmanakinyemi202@gmail.com>
In-Reply-To: <20250803020744.1037392-2-usmanakinyemi202@gmail.com>
From: "D. Ben Knoble" <ben.knoble@gmail.com>
Date: Sun, 3 Aug 2025 10:52:56 -0400
X-Gm-Features: Ac12FXxPE6xUHm-uCAD8P8lezk0wFW2Q1byMHAm9Eni2LFMmJOmjOFBX8uKTxsU
Message-ID: <CALnO6CBCynikVcZq17SxOTfwuRMM86cv+BWQb0zZoOdMYX-72g@mail.gmail.com>
Subject: Re: [PATCH V5 1/3] t/t1517: automate `git subcmd -h` tests outside a repository
To: Usman Akinyemi <usmanakinyemi202@gmail.com>
Cc: git@vger.kernel.org, chriscool@tuxfamily.org, christian.couder@gmail.com, 
	gitster@pobox.com, me@ttaylorr.com, ps@pks.im
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

On Sat, Aug 2, 2025 at 10:07=E2=80=AFPM Usman Akinyemi
<usmanakinyemi202@gmail.com> wrote:
>
> Replace manual `-h` tests with a loop over all subcommands using
> `git --list-cmds=3Dmain`. This ensures consistent coverage of `-h`
> behavior outside a repo and future-proofs the test by covering
> new commands automatically.
>
> Known exceptions are skipped or marked as expected failures.
>
> Suggested-by: Patrick Steinhardt <ps@pks.im>
> Helped-by: Junio C Hamano <gitster@pobox.com>
> Helped-by: D. Ben Knoble <ben.knoble+github@gmail.com>
> Signed-off-by: Usman Akinyemi <usmanakinyemi202@gmail.com>
> ---
>  t/t1517-outside-repo.sh | 23 +++++++++++++++++++++--
>  1 file changed, 21 insertions(+), 2 deletions(-)
>
> diff --git a/t/t1517-outside-repo.sh b/t/t1517-outside-repo.sh
> index 8f59b867f2..4a827b96f0 100755
> --- a/t/t1517-outside-repo.sh
> +++ b/t/t1517-outside-repo.sh
> @@ -109,8 +109,6 @@ test_expect_success LIBCURL 'remote-http outside repo=
sitory' '
>
>  test_expect_success 'update-server-info does not crash with -h' '
>         test_expect_code 129 git update-server-info -h >usage &&
> -       test_grep "[Uu]sage: git update-server-info " usage &&
> -       test_expect_code 129 nongit git update-server-info -h >usage &&
>         test_grep "[Uu]sage: git update-server-info " usage
>  '
>
> @@ -120,5 +118,26 @@ test_expect_success 'prune does not crash with -h' '
>         test_expect_code 129 nongit git prune -h >usage &&
>         test_grep "[Uu]sage: git prune " usage
>  '
> +for cmd in $(git --list-cmds=3Dmain)
> +do

This part of the patch does not apply cleanly to v2.50.0 (the original
base of the series), but I was able to apply to latest master
(866e6a391f (The sixteenth batch, 2025-08-01)). It seems like the
conflict was due to 7cd03a555a (builtin/prune: stop depending on
'the_repository', 2025-07-04).

All fine, just leaving a note for myself ;) I didn't see any mention
of the changed base in the cover letter, so I was confused. (Rebasing
onto latest master makes sense to me, but I'm not sure what the list
convention is).

PS I think we want a newline after the closing quote of the prune test
and before the start of the loop.

> +       cmd=3D${cmd%.*} # strip .sh, .perl, etc.
> +       case "$cmd" in
> +       archimport | cvsexportcommit | cvsimport | cvsserver | daemon | \
> +       difftool--helper | filter-branch | fsck-objects | get-tar-commit-=
id | \
> +       http-backend | http-fetch | http-push | init-db | \
> +       merge-octopus | merge-one-file | merge-resolve | mergetool | \
> +       mktag | p4 | p4.py | pickaxe | remote-ftp | remote-ftps | \
> +       remote-http | remote-https | replay | send-email | \
> +       sh-i18n--envsubst | shell | show | stage | submodule | svn | \
> +       upload-archive--writer | upload-pack | web--browse | whatchanged)
> +               expect_outcome=3Dexpect_failure ;;
> +       *)
> +               expect_outcome=3Dexpect_success ;;
> +       esac
> +       test_$expect_outcome "'git $cmd -h' outside a repository" '
> +               test_expect_code 129 nongit git $cmd -h >usage &&
> +               test_grep "[Uu]sage: git $cmd " usage
> +       '
> +done
>
>  test_done
> --
> 2.50.1
>

I have had to deal with yet more instaweb issues [1], which I think
are because the Windows CI runs without Perl. I'm trying to come up
with a fix there, but any advice welcome. (I think we just need to
mark that test with the Perl pre-req, but it's interesting that this
is the only command I've seen have that problem.)

Looks like Makefile:2664 is the responsible code, which I couldn't
find from just looking at the instaweb script (instead had to grep the
error message -> grep for use of the "unimplemented" script).

[1]: https://github.com/benknoble/git/actions/runs/16699688470/job/47268852=
351

--
D. Ben Knoble

From mboxrd@z Thu Jan  1 00:00:00 1970
Received: from fout-b1-smtp.messagingengine.com (fout-b1-smtp.messagingengine.com [202.12.124.144])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(No client certificate requested)
	by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4277A639
	for <git@vger.kernel.org>; Sun,  3 Aug 2025 17:39:14 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=202.12.124.144
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
	t=1754242756; cv=none; b=mFNHWvdZeacezmPOj17xmZQ4+KNNHcdmFx9x4CyVaYFevIPUmBstc5ggHGkWtGSMmMKLgwR7Kcl/MlOweYKkbxIsk50WHrO35zlXWDilNMD8v/Gz7Xbp8WZtv3G5SrWnrsbFDpdEh84El/13lpSKIS6RXnrVqbot3bXUMfl0BPk=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
	s=arc-20240116; t=1754242756; c=relaxed/simple;
	bh=65imJ4yA9y4gyqMv4WC2bFKo+Apmw8d0QsOFqirOlNo=;
	h=From:To:Cc:Subject:In-Reply-To:References:Date:Message-ID:
	 MIME-Version:Content-Type; b=FYpM+/8GntH5pbETvCaEh9DPZmO5tahZXYSR7LzyOsX0d3iXNeATUuyLSl/kpmDjeFAK2uUB/qXEzFYJ4s23F0mNVnAuL3HgiNZlKl+yzjT7zlntbyPCj18yW7DjNpn7f/4LEEaq3y3fgpkkarrQ8QgnY1F+lQeZjGvgM4WnARg=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=pobox.com; spf=pass smtp.mailfrom=pobox.com; dkim=pass (2048-bit key) header.d=pobox.com header.i=@pobox.com header.b=Q1/MR4Vx; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b=OI/lxYE/; arc=none smtp.client-ip=202.12.124.144
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=pobox.com
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=pobox.com
Authentication-Results: smtp.subspace.kernel.org;
	dkim=pass (2048-bit key) header.d=pobox.com header.i=@pobox.com header.b="Q1/MR4Vx";
	dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="OI/lxYE/"
Received: from phl-compute-04.internal (phl-compute-04.phl.internal [10.202.2.44])
	by mailfout.stl.internal (Postfix) with ESMTP id 209CE1D0003A;
	Sun,  3 Aug 2025 13:39:13 -0400 (EDT)
Received: from phl-frontend-02 ([10.202.2.161])
  by phl-compute-04.internal (MEProxy); Sun, 03 Aug 2025 13:39:13 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pobox.com; h=cc
	:cc:content-type:content-type:date:date:from:from:in-reply-to
	:in-reply-to:message-id:mime-version:references:reply-to:subject
	:subject:to:to; s=fm2; t=1754242752; x=1754329152; bh=pSdnXilkNp
	9+8Tcyd83a1KFNLWFzfrcQrOh7wMJ4W+8=; b=Q1/MR4VxVbTYZXqwnzWEAY+8fm
	cSnJroseYuLnWwK+bFGva/YB8RrwGr6YhD4ykJGVuneAMpJ8Uny3Oz03de5KnymT
	Z5mii4oje9Uo4BPlOfpT1XZ7fzXswNkzARRZJQPn8Nb7n7oW2wXyuETI6IQpePKg
	88dDnniiYEhesKrlDOm/GK6WKlTxw5/kMvGFsZyoQCD9Hmv/NPXDVO2YdZzP0dxH
	V7OaSmXDMlfiUf280WVjwq4LibPlpMxIaJ1+lRl/uM6Tcy2nawft38Yg/dCjIzGs
	9q2EcmrbPzxIukXp01x5xrbSaZdjdfnYkP7MCumCK6XBN1Jitac+FKQ9MN3A==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=
	messagingengine.com; h=cc:cc:content-type:content-type:date:date
	:feedback-id:feedback-id:from:from:in-reply-to:in-reply-to
	:message-id:mime-version:references:reply-to:subject:subject:to
	:to:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm3; t=
	1754242752; x=1754329152; bh=pSdnXilkNp9+8Tcyd83a1KFNLWFzfrcQrOh
	7wMJ4W+8=; b=OI/lxYE/gHukaBRgxIwf1E8cX/V1APVaCkIYXinC0P4ECFAoPnf
	S+sjI5TVHjpN9Y10VvcCSyl8tm0rMHTaKHbm4P0Pr+2qythbRSAzY/oqN2M3kLqi
	iGaoNhR22vLXCE44oMUHaMeP9DHSZ2ghYj83auE5zNpcP1DyxAKxs0+rlG/CT7FP
	B1rU1KX8J0uvt7LfaSmVwiXF65veomoleU2yVMYQdUfeqNxJVhmg9Sc8ho9WO6EM
	wPpSmBmxDByI/9XXaCwrA/aSgWIXT9DSke4L9eXNHuZd1POLbEQd24QDz7/HqoYl
	UVf0S4lTjPcwHxVE5lCu6cNyhXW6Ov6KQRw==
X-ME-Sender: <xms:wJ6PaF2UorOcCoCqFK1_FbPJiPNgYWB_YoU6aMUcn9wxmnFGkV14VQ>
    <xme:wJ6PaJB3zYzG6s85mYR7y2SlBXi4YdFQg5EMKSH0k-had2aXs2sH4npgCyHFzktCi
    WpCgdXC1RpOWskbaA>
X-ME-Received: <xmr:wJ6PaBhmkBpxSlQGVt0M9te7Zs9_a4DGCCG-_YLlJoQrSAEZ0D9cWBWXGqO_oe7rbZBuP_NWPGPfCOcLNk99-bIOWN_oxJiJuXrcCWQ>
X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeffedrtdefgdduuddttdejucetufdoteggodetrf
    dotffvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfurfetoffkrfgpnffqhgenuceu
    rghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujf
    gurhephffvvefujghffffkfgggtgesthdtredttdertdenucfhrhhomheplfhunhhiohcu
    vecujfgrmhgrnhhouceoghhithhsthgvrhesphhosghogidrtghomheqnecuggftrfgrth
    htvghrnhepfeevteetjeehueegffelvdetieevffeufeejleeuffetiefggfeftdfhfeei
    geeinecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepgh
    hithhsthgvrhesphhosghogidrtghomhdpnhgspghrtghpthhtohepkedpmhhouggvpehs
    mhhtphhouhhtpdhrtghpthhtohepsggvnhdrkhhnohgslhgvsehgmhgrihhlrdgtohhmpd
    hrtghpthhtohepuhhsmhgrnhgrkhhinhihvghmihdvtddvsehgmhgrihhlrdgtohhmpdhr
    tghpthhtohepghhithesvhhgvghrrdhkvghrnhgvlhdrohhrghdprhgtphhtthhopegthh
    hrihhstghoohhlsehtuhigfhgrmhhilhihrdhorhhgpdhrtghpthhtoheptghhrhhishht
    ihgrnhdrtghouhguvghrsehgmhgrihhlrdgtohhmpdhrtghpthhtohepmhgvsehtthgrhi
    hlohhrrhdrtghomhdprhgtphhtthhopehpshesphhkshdrihhmpdhrtghpthhtohepghhi
    thhsthgvrhesphhosghogidrtghomh
X-ME-Proxy: <xmx:wJ6PaLOWkyFhshT9GrSR6Q6g49E2OzO0oOP1gJrxmkEsBh1BKYzWbQ>
    <xmx:wJ6PaB_69-wy8ktODM7lGFATe-8OChpEd1cTMfTmAeLwwQAlSzqWMw>
    <xmx:wJ6PaMeppKm2Fwlfz9OuQ1xeeGxJwUSHWy3yOKvMkMU_ARrBGP4MQg>
    <xmx:wJ6PaAz0zHOvbLCN5O691E1JNbQHfdM4VrgGUflX4ksWGi2S6n9jvA>
    <xmx:wJ6PaEArTizg9eZKlYhwdxk6dlSI823km-EkGrNAMQMesHHoerHpSapr>
Feedback-ID: if26b431b:Fastmail
Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sun,
 3 Aug 2025 13:39:12 -0400 (EDT)
From: Junio C Hamano <gitster@pobox.com>
To: "D. Ben Knoble" <ben.knoble@gmail.com>
Cc: Usman Akinyemi <usmanakinyemi202@gmail.com>,  git@vger.kernel.org,
  chriscool@tuxfamily.org,  christian.couder@gmail.com,  me@ttaylorr.com,
  ps@pks.im
Subject: Re: [PATCH V5 1/3] t/t1517: automate `git subcmd -h` tests outside
 a repository
In-Reply-To: <CALnO6CBCynikVcZq17SxOTfwuRMM86cv+BWQb0zZoOdMYX-72g@mail.gmail.com>
	(D. Ben Knoble's message of "Sun, 3 Aug 2025 10:52:56 -0400")
References: <20250721115519.140361-1-usmanakinyemi202@gmail.com>
	<20250803020744.1037392-1-usmanakinyemi202@gmail.com>
	<20250803020744.1037392-2-usmanakinyemi202@gmail.com>
	<CALnO6CBCynikVcZq17SxOTfwuRMM86cv+BWQb0zZoOdMYX-72g@mail.gmail.com>
Date: Sun, 03 Aug 2025 10:39:10 -0700
Message-ID: <xmqqpldce24h.fsf@gitster.g>
User-Agent: Gnus/5.13 (Gnus v5.13)
Precedence: bulk
X-Mailing-List: git@vger.kernel.org
List-Id: <git.vger.kernel.org>
List-Subscribe: <mailto:git+subscribe@vger.kernel.org>
List-Unsubscribe: <mailto:git+unsubscribe@vger.kernel.org>
MIME-Version: 1.0
Content-Type: text/plain

"D. Ben Knoble" <ben.knoble@gmail.com> writes:

> All fine, just leaving a note for myself ;) I didn't see any mention
> of the changed base in the cover letter, so I was confused. (Rebasing
> onto latest master makes sense to me, but I'm not sure what the list
> convention is).

Once you picked a base, usually it is a good idea to keep it, unless
making a trial merge of the resulting topic branch into 'master'
leaves conflicts that are not trivial.  And I do appreciate your
noticing and mentioning that it is recommended to have a comment in
the cover letter (or a comment after the three-dash line if a single
patch topic) that the new iteration has been based on which commit.

Thanks.

From mboxrd@z Thu Jan  1 00:00:00 1970
Received: from mail-vs1-f54.google.com (mail-vs1-f54.google.com [209.85.217.54])
	(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
	(No client certificate requested)
	by smtp.subspace.kernel.org (Postfix) with ESMTPS id 8E01572614
	for <git@vger.kernel.org>; Wed,  6 Aug 2025 07:20:42 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.217.54
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
	t=1754464844; cv=none; b=LDZg9n/rg7ADRFYwOtEob+kJQcUWWR5DL9LMBqwqD9YaX9/muihTFuLaQj0qxcHs99JJMAY73HvnCTfLFBgcu/rmmf+41noJ4cHbJ2j662ZKne4caEiXil13wlmWBstj55Wri6/aUHH95u4TcihG2Myrmb3+aaQYbt+AnRfbf7o=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
	s=arc-20240116; t=1754464844; c=relaxed/simple;
	bh=5OTStVudtGYRwnhWSbBNBNW2z1nr1kA8EuvEd+JZVqk=;
	h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject:
	 To:Cc:Content-Type; b=FF4zGXwwuLEvC3MBWjXufaKBlganoecU9LvrTyJgTEg9M+kUEzh0e3j88cvU0Mt0PPfU7zecltOsAAZj7OWduQRW+fZ0UnIVJThApmFrVmGJ5jKeBbRIB37TA4dL1uBRHQ/7P3lI31ID7Ydsn8HoXfEop6fP285lBrvd1UX/5gw=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=l1cfZV8j; arc=none smtp.client-ip=209.85.217.54
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.b="l1cfZV8j"
Received: by mail-vs1-f54.google.com with SMTP id ada2fe7eead31-4e7949d9753so2122404137.2
        for <git@vger.kernel.org>; Wed, 06 Aug 2025 00:20:42 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=20230601; t=1754464841; x=1755069641; darn=vger.kernel.org;
        h=content-transfer-encoding:cc:to:subject:message-id:date:from
         :in-reply-to:references:mime-version:from:to:cc:subject:date
         :message-id:reply-to;
        bh=6Xt9YRv4SMiD6uraW2r9FIKTOXNpD2/txINHQ1jyztk=;
        b=l1cfZV8jiKZqu4xWQzz+Kta42fJC7YoPZemsCgSAtE8aIpymQ5NkYs1bt24GkZztDo
         9tpLAfjw0B/5UqotCHSjUeDz740z1U7iKA0orBoaN0E3jDGo+5B8ZeiNhaMPo64B9nrV
         c/kvJa+A4iD/B2U7rUQEraWK54AzqCB7a14r2vCFe1TIGFsVGovolOwZVdJq0ZG/XD+t
         xE1f18l/cay76s7GTpkO/b9L4zgdtmktzGqSkb0rj34SBmeqOvnL88DGlGv9TYU0tI6+
         v/WHOyTbCGGpQBYklw67c8Gd9LuRoVradhLBVGaRoI+JLLSzNwjUKxa5EDHqaMOQD3Ci
         Mg7g==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20230601; t=1754464841; x=1755069641;
        h=content-transfer-encoding:cc:to:subject:message-id:date:from
         :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc
         :subject:date:message-id:reply-to;
        bh=6Xt9YRv4SMiD6uraW2r9FIKTOXNpD2/txINHQ1jyztk=;
        b=wz0BJQ/rY3YiMKG/MsMOgCxmmT2srk6dhmwgVLNPzg8pBite6fv6hdpp6WyVrXYWIc
         WW7/uGPs/D3SbIbBBuBM6tQ5gvzHk9XUeQbXm4/ZoggMd4TAhkir5KnTt5ys/QZAzAwX
         ttSvi46YyAjxKKVVl9neVscsTn1jHO/ywSQLfjbnYytaUhKs2H/7QpIH1cTbBY8PK4Wa
         JsxEly89UeCYhpIW7Bzg+Fdtq8ZfMVzU0YdhP3UcD/B3ek4nnQqhLvsgwEYMkIJoJowp
         u85vGRKPAZK11sDqQhajVY84xsidgW9hSGHNdzfcnwi9cyGi5KKJy55R+L79USjNXIlE
         3WSQ==
X-Forwarded-Encrypted: i=1; AJvYcCVVmfI9xorAcksuD/El3go5FsZg4TOLhoWkMWAq7fTevmo7tcGubH08AHAENmxyIMcrFgc=@vger.kernel.org
X-Gm-Message-State: AOJu0YwVw8a7XYvBdG9APHPcuZR7R5iB80G6a2PmLQzlpFnNrDs2F2uL
	Y5KY5ZU05kZxeKuRXfE7f4Rt7FvK9KHuL80GN5KCRTANtC+2tU2taRh1eZo9+Yb5g84qr0mMOnb
	Zsn6lqN80k6pBLM1gmS3bkh0XmsUDa4c=
X-Gm-Gg: ASbGncvhRKDLMP3sA1PrtijTNnHoF6WUA9Az5RkXhHZUIWvCV/G9eCoRumnp23TjoOE
	xfNCdM+/YVcj5DRxFI0+qq/YxHejSSFJPfGY2ZqyhNhGsOSwb71WQ/0d4r3eJhOZvrjzb6cvV0T
	0/b5zBeXWncuAdV90srsyTIukIjc9gOLjbmIKfKpAlRp4e8t9DYg4OZgWqkrO/Od8lq9sgla4uu
	qS0lfc=
X-Google-Smtp-Source: AGHT+IEyYZjGp5Zo8H8or/5FYstbV5KsZjicyq44Wjgrs83+3WZBHC45R3INVsU2GhhHALHcFg45ZGYeV4pZmOmHzLo=
X-Received: by 2002:a05:6102:3050:b0:4fb:372d:6d70 with SMTP id
 ada2fe7eead31-50373d14ademr728652137.26.1754464841376; Wed, 06 Aug 2025
 00:20:41 -0700 (PDT)
Precedence: bulk
X-Mailing-List: git@vger.kernel.org
List-Id: <git.vger.kernel.org>
List-Subscribe: <mailto:git+subscribe@vger.kernel.org>
List-Unsubscribe: <mailto:git+unsubscribe@vger.kernel.org>
MIME-Version: 1.0
References: <20250721115519.140361-1-usmanakinyemi202@gmail.com>
 <20250803020744.1037392-1-usmanakinyemi202@gmail.com> <20250803020744.1037392-2-usmanakinyemi202@gmail.com>
 <CALnO6CBCynikVcZq17SxOTfwuRMM86cv+BWQb0zZoOdMYX-72g@mail.gmail.com> <xmqqpldce24h.fsf@gitster.g>
In-Reply-To: <xmqqpldce24h.fsf@gitster.g>
From: Usman Akinyemi <usmanakinyemi202@gmail.com>
Date: Wed, 6 Aug 2025 12:50:30 +0530
X-Gm-Features: Ac12FXz87uxjixv5UE7x84yryJ92dR_1Z9_C6bg_5BH9xxxFc4FFt4MCEIwE8Tg
Message-ID: <CAPSxiM9d9LkH125ikjwRc1z7PQZfDYpkab0ZHQKFrCpxg6eVJQ@mail.gmail.com>
Subject: Re: [PATCH V5 1/3] t/t1517: automate `git subcmd -h` tests outside a repository
To: Junio C Hamano <gitster@pobox.com>
Cc: "D. Ben Knoble" <ben.knoble@gmail.com>, git@vger.kernel.org, chriscool@tuxfamily.org, 
	christian.couder@gmail.com, me@ttaylorr.com, ps@pks.im
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

On Sun, Aug 3, 2025 at 11:09=E2=80=AFPM Junio C Hamano <gitster@pobox.com> =
wrote:
>
> "D. Ben Knoble" <ben.knoble@gmail.com> writes:
>
> > All fine, just leaving a note for myself ;) I didn't see any mention
> > of the changed base in the cover letter, so I was confused. (Rebasing
> > onto latest master makes sense to me, but I'm not sure what the list
> > convention is).
>
> Once you picked a base, usually it is a good idea to keep it, unless
> making a trial merge of the resulting topic branch into 'master'
> leaves conflicts that are not trivial.  And I do appreciate your
> noticing and mentioning that it is recommended to have a comment in
> the cover letter (or a comment after the three-dash line if a single
> patch topic) that the new iteration has been based on which commit.
Thanks for this and noted.
>
> Thanks.

From mboxrd@z Thu Jan  1 00:00:00 1970
Received: from mail-pj1-f54.google.com (mail-pj1-f54.google.com [209.85.216.54])
	(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
	(No client certificate requested)
	by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7F9002E36E0
	for <git@vger.kernel.org>; Fri,  8 Aug 2025 01:06:59 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.216.54
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
	t=1754615220; cv=none; b=rlVgIeXQ2aFBwyr9nf1Nxe0P5P3o1DATG4Z0AB7yLlU6X1WVwV0J0yWbXxOAzsO6QY5sfydDScui2KNdqdn8mu3tPsMTEVOCKYy04MUHFNEIv6Oq6lLKqaxWR2nwIt+chESQn+c9EjBtyLdp+OCqd6oEW3fT5TWtVtXIzRSVygE=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
	s=arc-20240116; t=1754615220; c=relaxed/simple;
	bh=wNqVH43sJ7SCN13epSOnRuVdq3++6orpovztiVUiDE0=;
	h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References:
	 MIME-Version; b=bEAOivUu5G4i0sh3HVLtKzAHWa1DmaHU3Yv8LZKbn0SfPim7pV0YzVk2vcV+G2cjpvVpAm+5vFjUbvbJSusHZ4Whe6ZgI4NApv5i0nveSMw27FixQhsdv63DGHLV4x8zRzyhkGnDEsDBETqxvMhwM7G0s4HBNcJyl4o0mvSgMJQ=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=Too5StVZ; arc=none smtp.client-ip=209.85.216.54
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.b="Too5StVZ"
Received: by mail-pj1-f54.google.com with SMTP id 98e67ed59e1d1-320dfa8cfa3so1582083a91.3
        for <git@vger.kernel.org>; Thu, 07 Aug 2025 18:06:59 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=20230601; t=1754615218; x=1755220018; darn=vger.kernel.org;
        h=content-transfer-encoding:mime-version:references:in-reply-to
         :message-id:date:subject:cc:to:from:from:to:cc:subject:date
         :message-id:reply-to;
        bh=lXqHjYx/lt98MsZhayPqOgNIOor+gq+1ErmH8qYsu4g=;
        b=Too5StVZri9OTayJP2f5tsitggNTEZu4ZNlXeKqKJvO+xZmBllE5VNDLgn/a2yDbKT
         xrmTzxG9KP4+Slav9mGReIq2AAFiuN9NYOv/dmIpxg3D9xFCDIviNPTHj7F06+3j+b5O
         2OiucmwCed7Mk4s8+9d09DGOKIQdOOQjQdUP9uLYaplunBv5nPDdemLqv8a6J32sieLJ
         CnntQdZ23GBGnXQG0/8nUs9Ywnfb0KfZSqeOHIvpNozxib4qQnjfCUuYLeTPcSahqn5O
         LWQZquGkqAhB/mLq0+updoParhHpDNzXcizVz7hQe4SW+aXdZwYUiEFIW94+xc8W4/Un
         wc/Q==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20230601; t=1754615218; x=1755220018;
        h=content-transfer-encoding:mime-version:references:in-reply-to
         :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc
         :subject:date:message-id:reply-to;
        bh=lXqHjYx/lt98MsZhayPqOgNIOor+gq+1ErmH8qYsu4g=;
        b=Py/3qBZHJ2n6NXiApo5Rn69G/X+/5dQH3S5NCZMYkAk3Vx0fRxJJdUU6J4Nzt/+vki
         KEfEKRFv0lxBZ2U0zqY0dRBmH5TT4dwJENRVTEtxiOHs5LoypJwgpSWs7HWAkGLR3wiu
         YQ7BPom7bYdkp2dYLLMlhGWz+5BXJSr4g7rGhpdSe1k0CNdGda3p25hu9tsVM3vVwPSX
         xp9szduGIgFQ4P4Z3/7+ZOU7QuShu2ArMPenTHybGUFvki0uV+vrI2xub4HDlYylfnbX
         SkHiigCuRZLNFakB+XSLNTscVq0zTSlB3ksQ8bsvjmVAYXgK0aoCFGYYnsl7jddOO6vI
         TSXQ==
X-Gm-Message-State: AOJu0YzJCcPZABcuHw5oMRwvCROcDs6Edmv1uwUBNnULhLVoV0DKH5h0
	6edT22osHO3yZrkR+ajjJj5VpT0rGGlaPpq6RdC5/1Fy9vi30obalXVkwEnDnixUlTg=
X-Gm-Gg: ASbGncs3ejc+Zx7gsqN05RjNitc4t6LBlzniRRYBS8kU2K7IIz/Xia9ciJlDwBfts/F
	CE6NwHSWamMLiySbJOsmtRZKMNbrTre7eeu3HKMWhTLswK7nlncezpckYCjKR/BHq/t5xFQSTJ3
	A/+rHheKlVD9nL12SsMlIVC5QVgNf4Q0V25CwYd2Cw0hbylggKPLMJgFa2JO8lWsMDuZ7hhJSFp
	FAwBnxndvhCdPB+CnvIFbKUjLu4qZ5TR8FzGyF2Exq4a7Rx/CYqkzZKE4EE7w5RpgPDhVQsVDJ2
	ckdILqWO8yy5WraulmrCjnbau20S+4EE3yHehf48+ZhXMUyj9ZPtvKgqHkThI0zsLx8GPVlPsI4
	Yx1ly91WY9D8mHJcc/ZAV6PQRjxXQoDYRiWI1h+2F1MkhKB+xhtQ=
X-Google-Smtp-Source: AGHT+IHYDXcTLdYTfRklnrva1+TG+viiQtrmQd5LYFX99Nt/OKBMqNBi+F6w+t6pp5d02vuW+BK/MQ==
X-Received: by 2002:a17:90b:2787:b0:31e:d4e3:4002 with SMTP id 98e67ed59e1d1-321839d79bdmr1608106a91.2.1754615218403;
        Thu, 07 Aug 2025 18:06:58 -0700 (PDT)
Received: from archlinux.tail6959dd.ts.net ([202.164.41.66])
        by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-321612596d3sm6610391a91.19.2025.08.07.18.06.54
        (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
        Thu, 07 Aug 2025 18:06:58 -0700 (PDT)
From: Usman Akinyemi <usmanakinyemi202@gmail.com>
To: git@vger.kernel.org
Cc: usmanakinyemi202@gmail.com,
	ben.knoble@gmail.com,
	chriscool@tuxfamily.org,
	christian.couder@gmail.com,
	gitster@pobox.com,
	me@ttaylorr.com,
	ps@pks.im
Subject: [PATCH v6 0/3] refactor t1517 to focus on help output outside a repository
Date: Fri,  8 Aug 2025 06:36:48 +0530
Message-ID: <20250808010651.591906-1-usmanakinyemi202@gmail.com>
X-Mailer: git-send-email 2.50.1
In-Reply-To: <20250803020744.1037392-1-usmanakinyemi202@gmail.com>
References: <20250803020744.1037392-1-usmanakinyemi202@gmail.com>
Precedence: bulk
X-Mailing-List: git@vger.kernel.org
List-Id: <git.vger.kernel.org>
List-Subscribe: <mailto:git+subscribe@vger.kernel.org>
List-Unsubscribe: <mailto:git+unsubscribe@vger.kernel.org>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit

This series refactors t1517-outside-repo.sh to focus on testing
`git subcmd -h` outside a Git repository. It does two things:

  1. Moves the existing `update-server-info -h` test to t5200, since it
     tests behavior inside a repo and belongs with other update-server-info
     tests.

  2. Moves the existing `prune -h` test to t5304, since it
     tests behavior inside a repo and belongs with other prune tests.

  3. Introduces a loop in t1517 that automatically verifies `-h` output
     for all main Git subcommands when run outside a repository, using
     the `nongit` helper and `git --list-cmds=main`.

This makes t1517 easier to maintain and ensures that new commands are
automatically covered for this class of behavior.

Changes since v5:
- fix instaweb test using PERL prereqs (helped by Ben)

Note:
This new iteration is based on
7cd03a555a (builtin/prune: stop depending on 'the_repository', 2025-07-04)
commit.


Usman Akinyemi (3):
  t/t1517: automate `git subcmd -h` tests outside a repository
  t5200: move `update-server-info -h` test from t1517
  t5304: move `prune -h` test from t1517

 t/t1517-outside-repo.sh       | 40 +++++++++++++++++++++++------------
 t/t5200-update-server-info.sh |  5 +++++
 t/t5304-prune.sh              |  5 +++++
 3 files changed, 37 insertions(+), 13 deletions(-)

-- 
2.50.1


From mboxrd@z Thu Jan  1 00:00:00 1970
Received: from mail-pj1-f41.google.com (mail-pj1-f41.google.com [209.85.216.41])
	(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
	(No client certificate requested)
	by smtp.subspace.kernel.org (Postfix) with ESMTPS id E624A2E36E0
	for <git@vger.kernel.org>; Fri,  8 Aug 2025 01:07:02 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.216.41
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
	t=1754615224; cv=none; b=CMs5R36UwAX+br6SEJ7lOLABumHNO6idhMMPaZawnvWnEJFb9m+0lEy+J73ZKOrOtoLEZXtfl4fRzP9VK3LNGePBIGz5vff5pkX/D5ieeAax240fOLISxQ+3uowBHzAH9MD1nWItoOxjK+FNU/AKmOUCcjotu19k5hpqG5OYzQA=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
	s=arc-20240116; t=1754615224; c=relaxed/simple;
	bh=7FHPfOxOSgBO2odBocEIPeYEB1XuRMpJyvm2pCnTCgU=;
	h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References:
	 MIME-Version; b=n6kW0PhO7aIpX7jKaQK5h+SXBrvZbFXMTed8voLKr8Qu0L3AihOlQT8jMYuMJtWHekEWgUH152o3xBU51hdsRyirZmd5HtQCxIk0QVea0+0YTJw1+vXZY58t/Gc5wz1kGVsyX4n0945lIw9nMnSgCUdcZoGGBk5G0CA4yAYX51c=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=Fh1sCT4z; arc=none smtp.client-ip=209.85.216.41
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.b="Fh1sCT4z"
Received: by mail-pj1-f41.google.com with SMTP id 98e67ed59e1d1-321265ae417so2015789a91.2
        for <git@vger.kernel.org>; Thu, 07 Aug 2025 18:07:02 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=20230601; t=1754615222; x=1755220022; darn=vger.kernel.org;
        h=content-transfer-encoding:mime-version:references:in-reply-to
         :message-id:date:subject:cc:to:from:from:to:cc:subject:date
         :message-id:reply-to;
        bh=5LRfAm4IuoZqy/WrV7YGXiqMF+2eMBF5iumiYOSxPag=;
        b=Fh1sCT4zH6AieS2T8eNXPacrGjbq3RKZppldy7e4Q0F/j9cYv5pfzVDCpb2O81lxgL
         MkfwgXH1THKI8mtasgW3i7xtQALX+4GEgIbETOwrS4cxfBnOiDJBmNh3DZ77TDeRGuDw
         ziROpTtSzzmzrhelafw1mfHo7qSENURyEHSRvRX7t70TAte2o/jcViX6O0CSgs2lXz4i
         nEQrNEYIU7QJFrhV04vP8MgKbDBpVKm2BO+6Bg3pJJkoZ5/cwnXvEjB7we7HyI4I6RSi
         EWLMwP73WmPPNdxmLbDc/rkYqpidyCpfV7Px1dj530JWi2Vf1HJOqepqOxc3A9lEsNDa
         ttnw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20230601; t=1754615222; x=1755220022;
        h=content-transfer-encoding:mime-version:references:in-reply-to
         :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc
         :subject:date:message-id:reply-to;
        bh=5LRfAm4IuoZqy/WrV7YGXiqMF+2eMBF5iumiYOSxPag=;
        b=mG3yOrYQcOMEjxvGSt0W5wCd+qVVj3NJb3w8nW86O0RA094en8Wq597rdcTHV8TLkK
         /STiYp/e/WSfydICDkGE230lkv03erd+eZsNuvhNb+NzizQXwkRJASzI14GaFrWFdtV2
         XCnajfpo8K2eFFE/D/XEVFixX+Gsk/LWH17ZH7PPatzwk1ycE2akHB+mTsj1Bkxcixty
         KP+YXM28KSyqBcZSsVf4JDu0DMeykEWIu+t7VmteX3LJEqjKleYQ2iqle280LpiFqdmt
         tLAS/YUBlPWfk4ZmCX/bKJ2fEnoIuAG+YX6TpegiayrfJikrrqhMOqzoWwe78igfuoRf
         TiCA==
X-Gm-Message-State: AOJu0YwTPjACAebgyKncp/wDFMAR0jmijFwDHh6QV2Lb1cHWt0PsNg4V
	rQ7GorVktsRr++ZgZdTu61Xzc0By61tIwNAc4mKxMfCZSemf8MB+iluF6vX4hgrdDws=
X-Gm-Gg: ASbGncuCPKlmb/Aakc99FF6yZZFKNYj+Gp9ggIg6nvPp2ndjEVxM2+OpFlg0OCYEELb
	QN/xj8p4OYSZ6MVTyRM2ydjbSpRQESPipzJWtn1hTtT+afuJ0HKCj5VDZLaD37tAdYW1/khozTB
	14us99psZU8DRciRyq85wyDH+rkHU2qqSsHmiLCTTqy6uZ2zC+bR7O2KAHzucG9ySjCcCNWFolP
	uEJKdzuVCbqBRa2Nxd8o7UXgu8NB7bAMp2ziMU79xaWJdXhcG4UhrAP2vIwbCJpV9NxX5PNfYLS
	shjWxSihqGrBIEENGbuZtJGhXrvg5Zzy1JArfOQEmaSVIKCshBhpGS23yaZ634sU8gb2KxDNEoL
	xOY0voUcsrGwBA/NaHunOtz7RsX2bHbmBPx/MGhyaTQIawkOCbgs=
X-Google-Smtp-Source: AGHT+IEalFS3Q943shUUEj6rUPfuyidzAQ5KW3a/ucwE1MbYEjuNx7Ebsqu7sNlVhog48Qo1VcQxCA==
X-Received: by 2002:a17:90b:3951:b0:321:2f06:d3ab with SMTP id 98e67ed59e1d1-32183b4573emr1788084a91.21.1754615221972;
        Thu, 07 Aug 2025 18:07:01 -0700 (PDT)
Received: from archlinux.tail6959dd.ts.net ([202.164.41.66])
        by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-321612596d3sm6610391a91.19.2025.08.07.18.06.58
        (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
        Thu, 07 Aug 2025 18:07:01 -0700 (PDT)
From: Usman Akinyemi <usmanakinyemi202@gmail.com>
To: git@vger.kernel.org
Cc: usmanakinyemi202@gmail.com,
	ben.knoble@gmail.com,
	chriscool@tuxfamily.org,
	christian.couder@gmail.com,
	gitster@pobox.com,
	me@ttaylorr.com,
	ps@pks.im,
	"D. Ben Knoble" <ben.knoble+github@gmail.com>
Subject: [PATCH v6 1/3] t/t1517: automate `git subcmd -h` tests outside a repository
Date: Fri,  8 Aug 2025 06:36:49 +0530
Message-ID: <20250808010651.591906-2-usmanakinyemi202@gmail.com>
X-Mailer: git-send-email 2.50.1
In-Reply-To: <20250808010651.591906-1-usmanakinyemi202@gmail.com>
References: <20250803020744.1037392-1-usmanakinyemi202@gmail.com>
 <20250808010651.591906-1-usmanakinyemi202@gmail.com>
Precedence: bulk
X-Mailing-List: git@vger.kernel.org
List-Id: <git.vger.kernel.org>
List-Subscribe: <mailto:git+subscribe@vger.kernel.org>
List-Unsubscribe: <mailto:git+unsubscribe@vger.kernel.org>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit

Replace manual `-h` tests with a loop over all subcommands using
`git --list-cmds=main`. This ensures consistent coverage of `-h`
behavior outside a repo and future-proofs the test by covering
new commands automatically.

Known exceptions are skipped or marked as expected failures.

Suggested-by: Patrick Steinhardt <ps@pks.im>
Helped-by: Junio C Hamano <gitster@pobox.com>
Helped-by: D. Ben Knoble <ben.knoble+github@gmail.com>
Signed-off-by: Usman Akinyemi <usmanakinyemi202@gmail.com>
---
 t/t1517-outside-repo.sh | 30 ++++++++++++++++++++++++++++--
 1 file changed, 28 insertions(+), 2 deletions(-)

diff --git a/t/t1517-outside-repo.sh b/t/t1517-outside-repo.sh
index 8f59b867f2..e9f6d03e1b 100755
--- a/t/t1517-outside-repo.sh
+++ b/t/t1517-outside-repo.sh
@@ -109,8 +109,6 @@ test_expect_success LIBCURL 'remote-http outside repository' '
 
 test_expect_success 'update-server-info does not crash with -h' '
 	test_expect_code 129 git update-server-info -h >usage &&
-	test_grep "[Uu]sage: git update-server-info " usage &&
-	test_expect_code 129 nongit git update-server-info -h >usage &&
 	test_grep "[Uu]sage: git update-server-info " usage
 '
 
@@ -121,4 +119,32 @@ test_expect_success 'prune does not crash with -h' '
 	test_grep "[Uu]sage: git prune " usage
 '
 
+for cmd in $(git --list-cmds=main)
+do
+	cmd=${cmd%.*} # strip .sh, .perl, etc.
+	case "$cmd" in
+	archimport | cvsexportcommit | cvsimport | cvsserver | daemon | \
+	difftool--helper | filter-branch | fsck-objects | get-tar-commit-id | \
+	http-backend | http-fetch | http-push | init-db | \
+	merge-octopus | merge-one-file | merge-resolve | mergetool | \
+	mktag | p4 | p4.py | pickaxe | remote-ftp | remote-ftps | \
+	remote-http | remote-https | replay | send-email | \
+	sh-i18n--envsubst | shell | show | stage | submodule | svn | \
+	upload-archive--writer | upload-pack | web--browse | whatchanged)
+		expect_outcome=expect_failure ;;
+	*)
+		expect_outcome=expect_success ;;
+	esac
+	case "$cmd" in
+	instaweb)
+		prereq=PERL ;;
+	*)
+		prereq= ;;
+	esac
+	test_$expect_outcome $prereq "'git $cmd -h' outside a repository" '
+		test_expect_code 129 nongit git $cmd -h >usage &&
+		test_grep "[Uu]sage: git $cmd " usage
+	'
+done
+
 test_done
-- 
2.50.1


From mboxrd@z Thu Jan  1 00:00:00 1970
Received: from mail-pj1-f52.google.com (mail-pj1-f52.google.com [209.85.216.52])
	(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
	(No client certificate requested)
	by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6A5052E36E0
	for <git@vger.kernel.org>; Fri,  8 Aug 2025 01:07:06 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.216.52
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
	t=1754615227; cv=none; b=LhDuMkCwVZqvVHVvnjUUEM0Uvu9Y5A3Ku4Lbs1uZVPPuuKYlQF8kR9+qNx97hW5yMZs6bhHDiL7/xotuYO57gHwpz9gZS4cl+nRbSWdCVqDW+fZM61GYcO9ZJvy8/1+/G91kPs5nhYht3D0eGmbCfxtpN3b9gwMxpRAP/wT5Hi4=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
	s=arc-20240116; t=1754615227; c=relaxed/simple;
	bh=sxcHpzyD3bqRwQA1Jm9SGl8R67QR8wciPDckdaETtAA=;
	h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References:
	 MIME-Version; b=m04phQYsQKM++9OaiUmZkVQnVDg7l0cxUCrIDf/PY+zGFhDqSYM+umzpEkXP7fAFQ8JPAmaQri8iTsxoPihfyiXFcnITSxCvPyaqmeANPUGHPcNEnIvpsYf61b75sXHumxoP5AHWB8UMWhaAeqfGeZ3Ugvu9V3NvuYcHk6ilybw=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=RllHKAJZ; arc=none smtp.client-ip=209.85.216.52
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.b="RllHKAJZ"
Received: by mail-pj1-f52.google.com with SMTP id 98e67ed59e1d1-31ec651c2a1so1449279a91.0
        for <git@vger.kernel.org>; Thu, 07 Aug 2025 18:07:06 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=20230601; t=1754615225; x=1755220025; darn=vger.kernel.org;
        h=content-transfer-encoding:mime-version:references:in-reply-to
         :message-id:date:subject:cc:to:from:from:to:cc:subject:date
         :message-id:reply-to;
        bh=TBDkuzUmPMsoOI99hQPhu6HtYS1NhGOHabuTgpoVolM=;
        b=RllHKAJZXn300WSWwgS4ELizJg74nbZwWMJZLwQCtoEtgcJ1zIlIANFzvPB1r14hQF
         S+H7zlgekY8lZg4c01O1w1hUbSJ0jBc+J6sGHB0VW39Tbw06vwgXvxKrmk73ojxnANgg
         YScU3/dE01xZsmBFNFmhHVaowYVbrr+U5EFNx+6pTUiqktobAvhhxeh9gTNceaDQMz6r
         yNEu8hph9QLnvUkkCWWGeLMjzmJRm277h5OyxZXB1v1SPIWcaUzbxUS+KHYezJbcjUrp
         Klq+MXfl/DwtFTWBnn0/MbHl2vnYCLBK6seQabvlYkHd6JD3jvA0eJp6Im93ECr5aD4J
         Pp9A==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20230601; t=1754615225; x=1755220025;
        h=content-transfer-encoding:mime-version:references:in-reply-to
         :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc
         :subject:date:message-id:reply-to;
        bh=TBDkuzUmPMsoOI99hQPhu6HtYS1NhGOHabuTgpoVolM=;
        b=Vs8Jaml9RgrObGJ4NSfMEWYlwOUSnyK0eIojdi3p0FS9g4fdPDnd8YhJXZehaiHIeE
         Tk8/2MbVTGK1jZhz7tVZ3YRuW0QGN2wit9TttPZ/pBkNc7ybHXHoUmjz7IRoMGaWbuwH
         g1LymNcFckCjsF47kqu69pC+WLKiBIBupQEPH9fa5loIfndh3EU0BboS35/GvYX8sKgu
         giu52W+JK3/dLibOrIZsBcjepffQRf176eHIqkIInB6yPwetmb4B0Rn7rjV6T7u2N88N
         tMGdggQtFp/UOevweNjMJCTesm9PbfW/TJFZwZ2XP5B6gPSE8FAlUL6CefoyAB6Itmd0
         HPwg==
X-Gm-Message-State: AOJu0YwgOFRSp5LnslUwCP6cG1pSdL2ZIxeDMo6sJ09SkPY18ey5Qg/5
	JNf6DzHPQXoq28YxuXauqKkZSS/l0A3PWJkJlB/FKdHw9o4lDF/H0pOQ5FfSLXixymk=
X-Gm-Gg: ASbGncumsExneWnJhYkVNr0J3fevZr3z36I0smGW5oSnsA077ipskoJVUkX44E3v35A
	rdhBV9PiOAtReDZDrFz84ehp7KqhVRIODDyz2sEjj6PD4Z0szEfPcSTpNJOaUz/7So7bnB5x4/x
	Lq6GoLSK2+3HOlu1IxQnJ9S5dRllqJy85jGFezeZj764ym5mSM4SnH/Yz3Df3KlbdD2szv6wnjG
	Ubv43Y1VD6pE5rXPNxMku/7G7PHK/F1/vG2wsd6ayjzADOtJuNlYqfFpSJeIX3qhaNqWLfBvkRp
	vDXt3DZntF3bA280WJA23dj6lO+70OWDA/qAuVGjZsHOzcqRgAdZJiK+Gt4gY3ymY+JWE9a8mum
	e7kLilVEcmZVmWljJB9NXcSRAfR378SqRNiYFSdcuxJQ2qjcYK1ABaFM0mkm5tg==
X-Google-Smtp-Source: AGHT+IEO+25WRmI/Owksm+/Vqdpx0HK3yZOYYNk7HC34nbsAr025oN60IQJDTI2mdmiFLdcSFEgOsw==
X-Received: by 2002:a17:90b:2e49:b0:31f:d0:95bc with SMTP id 98e67ed59e1d1-32183c4585dmr1407785a91.25.1754615225190;
        Thu, 07 Aug 2025 18:07:05 -0700 (PDT)
Received: from archlinux.tail6959dd.ts.net ([202.164.41.66])
        by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-321612596d3sm6610391a91.19.2025.08.07.18.07.02
        (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
        Thu, 07 Aug 2025 18:07:04 -0700 (PDT)
From: Usman Akinyemi <usmanakinyemi202@gmail.com>
To: git@vger.kernel.org
Cc: usmanakinyemi202@gmail.com,
	ben.knoble@gmail.com,
	chriscool@tuxfamily.org,
	christian.couder@gmail.com,
	gitster@pobox.com,
	me@ttaylorr.com,
	ps@pks.im
Subject: [PATCH v6 2/3] t5200: move `update-server-info -h` test from t1517
Date: Fri,  8 Aug 2025 06:36:50 +0530
Message-ID: <20250808010651.591906-3-usmanakinyemi202@gmail.com>
X-Mailer: git-send-email 2.50.1
In-Reply-To: <20250808010651.591906-1-usmanakinyemi202@gmail.com>
References: <20250803020744.1037392-1-usmanakinyemi202@gmail.com>
 <20250808010651.591906-1-usmanakinyemi202@gmail.com>
Precedence: bulk
X-Mailing-List: git@vger.kernel.org
List-Id: <git.vger.kernel.org>
List-Subscribe: <mailto:git+subscribe@vger.kernel.org>
List-Unsubscribe: <mailto:git+unsubscribe@vger.kernel.org>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit

t1517 is now focused on testing subcommands outside a repository.
Move the in-repo `-h` test for `update-server-info` to t5200,
which covers this command.

Suggested-by: Patrick Steinhardt <ps@pks.im>
Helped-by: Junio C Hamano <gitster@pobox.com>
Signed-off-by: Usman Akinyemi <usmanakinyemi202@gmail.com>
---
 t/t1517-outside-repo.sh       | 5 -----
 t/t5200-update-server-info.sh | 5 +++++
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/t/t1517-outside-repo.sh b/t/t1517-outside-repo.sh
index e9f6d03e1b..4eba3f486d 100755
--- a/t/t1517-outside-repo.sh
+++ b/t/t1517-outside-repo.sh
@@ -107,11 +107,6 @@ test_expect_success LIBCURL 'remote-http outside repository' '
 	test_grep "^error: remote-curl" actual
 '
 
-test_expect_success 'update-server-info does not crash with -h' '
-	test_expect_code 129 git update-server-info -h >usage &&
-	test_grep "[Uu]sage: git update-server-info " usage
-'
-
 test_expect_success 'prune does not crash with -h' '
 	test_expect_code 129 git prune -h >usage &&
 	test_grep "[Uu]sage: git prune " usage &&
diff --git a/t/t5200-update-server-info.sh b/t/t5200-update-server-info.sh
index 8365907055..a551e955b5 100755
--- a/t/t5200-update-server-info.sh
+++ b/t/t5200-update-server-info.sh
@@ -46,4 +46,9 @@ test_expect_success 'midx does not create duplicate pack entries' '
 	test_must_be_empty dups
 '
 
+test_expect_success 'update-server-info does not crash with -h' '
+	test_expect_code 129 git update-server-info -h >usage &&
+	test_grep "[Uu]sage: git update-server-info " usage
+'
+
 test_done
-- 
2.50.1


From mboxrd@z Thu Jan  1 00:00:00 1970
Received: from mail-pj1-f48.google.com (mail-pj1-f48.google.com [209.85.216.48])
	(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
	(No client certificate requested)
	by smtp.subspace.kernel.org (Postfix) with ESMTPS id A43BF2E36E0
	for <git@vger.kernel.org>; Fri,  8 Aug 2025 01:07:09 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.216.48
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
	t=1754615231; cv=none; b=soDhvBb7VJNTMLFvzRl2a2l+boTK7RKbRudEYhV3JkuL6jOjkuoa5938BetnTkQFIi2lSaLaDIp+8+/KxZKU7v9sS/Kwa1nEBuy5xefbP5qGpRvKAFZqlRkHHNEG/D2lWnhJgBfjb1hSC73+pyQ7uo4Wz2nTO8r+rQ+fCa4uA30=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
	s=arc-20240116; t=1754615231; c=relaxed/simple;
	bh=wioJykWEGIIjJqViCUc/3MDzWpwPKKMbXZr3Ooczylc=;
	h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References:
	 MIME-Version; b=RXxT6AX/lnZOXzT8Jyep1jk5BOFZOifmbRvkpAxagI0i2Cbne83VSv8Cg2jLnm/ik03cowp4BYUioCm0piTd/2gj5gXmFGf4Kzh5YOpfTRs8xuYQH00Xbjenyijf/95yNTwVKsQwpobVHoTbPumVckMMvbjkOsiLawPLmOtV6wA=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=ANg6/egG; arc=none smtp.client-ip=209.85.216.48
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.b="ANg6/egG"
Received: by mail-pj1-f48.google.com with SMTP id 98e67ed59e1d1-31f4e49dca0so2098800a91.1
        for <git@vger.kernel.org>; Thu, 07 Aug 2025 18:07:09 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=20230601; t=1754615229; x=1755220029; darn=vger.kernel.org;
        h=content-transfer-encoding:mime-version:references:in-reply-to
         :message-id:date:subject:cc:to:from:from:to:cc:subject:date
         :message-id:reply-to;
        bh=MSrFpb3WgF5qIDb1tXCqfrVSTVytsOSiuHaYxcOCg0w=;
        b=ANg6/egGhoPUFNcPdgamkOe1mqATefLLw8u0ouF0PHfcbQDK6dlGKLRxhsqVbelNpk
         yLloTQrahAQyc8RwX/hCT/ecZnaT5XuX8zabyvUXVt3iF4l9ufcNYHCHgJ/x0UuTtoDR
         lb5fjlejAlgO5geqvMme8p3aV5ewduRzbXxvPByoI4acohvtyBijVm6ootaRHasNBx3H
         xR9g3Y3WSxGdVEE+g1Hsyex8KW3yR9/PoGdRqd7IkZ57lnjUwsY5llzwfOZPvZwVSE0q
         Ipf7L0Dg01HUv2Nr3KvUQTcZh2uVBrrEy6cqsNaI8shs4NSri8KQHs25kMAlHMvvfUlZ
         pOIA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20230601; t=1754615229; x=1755220029;
        h=content-transfer-encoding:mime-version:references:in-reply-to
         :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc
         :subject:date:message-id:reply-to;
        bh=MSrFpb3WgF5qIDb1tXCqfrVSTVytsOSiuHaYxcOCg0w=;
        b=c96ysYRDOGxQF+KnbHptVtHYB3B0Fjv8vLY/QK4O4EPbiNrkvPC0RkwRXVhy35CfDf
         dnes27fZpPTeoTI70TmfYXqBknWJvYl4GwES4FJQpq1dRo5m+nQ7MUN/y13eOOWRePF4
         w/a6y1UhpR5CzlFyy6noWoMsDP802RwoKjV4WB+/asVDJCdmjK3iBbGhbjDFzApuaUOy
         cuUJMSLdsk1qiXxz/3ixg0BG6HHR8V0hNO7GvMgpaHvod0ifs6k87EN61j+Hbk4DhuXM
         hnm5o0AuKDBrw9ahh445nq2eGOYbaFl5+f9PL5gdwocjcWeQGi3duyIVaFk/Vxp9qo4z
         Zwow==
X-Gm-Message-State: AOJu0YyuSNY/ZQBF4z0XbJ18e8+2Hsc/RWGnauxn/nDxhE60tGKjpzBt
	YrxNYRUzoRyQASCRcWPJZr/0YqnWDBxDbG3kEh98Hr6D2bjp/SobFgy9MTR/+5tUCSI=
X-Gm-Gg: ASbGnct8v/iJeQMOONCvlS4WbImEm7MVEk8OplYeVaAJq/TpP0IvWmStS62RsMm+t/U
	yDDXdpsDueiU/6gsRuJF/WBqGEgrb96aAoFqe8FnDpHmOFi+t5UlvwDo6s5/ImTBHjQzmEtRIDU
	5JD8yzcZTOUlyXFxveXZWLlKgpQEHgllJLNTeAKbrDHv6/SFMbPQ/JJsjJjB2j6R2nJJzi2recC
	F7i7EELhAWT7RbpR4C2bZMxxbzQObO+xChTOgbWNJJAvyhRsJhPj3b/pq7OKggpUO0q3TLlVYSY
	BHyDu15oW4nCGgfyTJ/Q0LoseOK7pZrPUbl9XaAaEgY4nOof4mZVEhWLAFXmQORm5TJ4aR1mYf7
	Reh54QrfCgG5FlxOTRNN9Nqxjb9175zgrvXzCU77YCBnBbIR61lg=
X-Google-Smtp-Source: AGHT+IETIpe6y6PyuKLkVgpW0MHCFKYd9L5xczh0l/o59gvvAzuHiwc+3nVJY0D/CZ198nbQo8b7dA==
X-Received: by 2002:a17:90b:2252:b0:31f:1a3e:fe31 with SMTP id 98e67ed59e1d1-321839fc0ecmr1736404a91.11.1754615228554;
        Thu, 07 Aug 2025 18:07:08 -0700 (PDT)
Received: from archlinux.tail6959dd.ts.net ([202.164.41.66])
        by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-321612596d3sm6610391a91.19.2025.08.07.18.07.05
        (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
        Thu, 07 Aug 2025 18:07:08 -0700 (PDT)
From: Usman Akinyemi <usmanakinyemi202@gmail.com>
To: git@vger.kernel.org
Cc: usmanakinyemi202@gmail.com,
	ben.knoble@gmail.com,
	chriscool@tuxfamily.org,
	christian.couder@gmail.com,
	gitster@pobox.com,
	me@ttaylorr.com,
	ps@pks.im
Subject: [PATCH v6 3/3] t5304: move `prune -h` test from t1517
Date: Fri,  8 Aug 2025 06:36:51 +0530
Message-ID: <20250808010651.591906-4-usmanakinyemi202@gmail.com>
X-Mailer: git-send-email 2.50.1
In-Reply-To: <20250808010651.591906-1-usmanakinyemi202@gmail.com>
References: <20250803020744.1037392-1-usmanakinyemi202@gmail.com>
 <20250808010651.591906-1-usmanakinyemi202@gmail.com>
Precedence: bulk
X-Mailing-List: git@vger.kernel.org
List-Id: <git.vger.kernel.org>
List-Subscribe: <mailto:git+subscribe@vger.kernel.org>
List-Unsubscribe: <mailto:git+unsubscribe@vger.kernel.org>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit

t1517 is now focused on testing subcommands outside a repository.
Move the in-repo `-h` test for `prune` to t5304, which covers
this command.

Suggested-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Usman Akinyemi <usmanakinyemi202@gmail.com>
---
 t/t1517-outside-repo.sh | 7 -------
 t/t5304-prune.sh        | 5 +++++
 2 files changed, 5 insertions(+), 7 deletions(-)

diff --git a/t/t1517-outside-repo.sh b/t/t1517-outside-repo.sh
index 4eba3f486d..3dc602872a 100755
--- a/t/t1517-outside-repo.sh
+++ b/t/t1517-outside-repo.sh
@@ -107,13 +107,6 @@ test_expect_success LIBCURL 'remote-http outside repository' '
 	test_grep "^error: remote-curl" actual
 '
 
-test_expect_success 'prune does not crash with -h' '
-	test_expect_code 129 git prune -h >usage &&
-	test_grep "[Uu]sage: git prune " usage &&
-	test_expect_code 129 nongit git prune -h >usage &&
-	test_grep "[Uu]sage: git prune " usage
-'
-
 for cmd in $(git --list-cmds=main)
 do
 	cmd=${cmd%.*} # strip .sh, .perl, etc.
diff --git a/t/t5304-prune.sh b/t/t5304-prune.sh
index 1f1f664871..2be7cd30de 100755
--- a/t/t5304-prune.sh
+++ b/t/t5304-prune.sh
@@ -364,4 +364,9 @@ test_expect_success 'gc.recentObjectsHook' '
 	git cat-file -p $BLOB
 '
 
+test_expect_success 'prune does not crash with -h' '
+	test_expect_code 129 git prune -h >usage &&
+	test_grep "[Uu]sage: git prune " usage
+'
+
 test_done
-- 
2.50.1


From mboxrd@z Thu Jan  1 00:00:00 1970
Received: from fhigh-b6-smtp.messagingengine.com (fhigh-b6-smtp.messagingengine.com [202.12.124.157])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(No client certificate requested)
	by smtp.subspace.kernel.org (Postfix) with ESMTPS id 2B8AF27FB10
	for <git@vger.kernel.org>; Fri,  8 Aug 2025 14:53:14 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=202.12.124.157
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
	t=1754664797; cv=none; b=QmBE9BB9BJvueRb3hfOZpo1RU1JZbLS9Q7Cxxhzv1S7Q9Gwxf2X55cOJXOWzsratzxv3XkEQg4oyKM4zWJ4UypYE13MwiME9OUVk5uxmAsOAhKjXkzafq0dU+Fp4vUnRwZqzeTZyWqfJA0Jr6BuR0M8RAoVZzCU2adDFLdgTnqI=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
	s=arc-20240116; t=1754664797; c=relaxed/simple;
	bh=Qt2YoJOGaTgDMHGKNbPRgqXEVQkVt+ebabfSVDX9cc4=;
	h=From:To:Cc:Subject:In-Reply-To:References:Date:Message-ID:
	 MIME-Version:Content-Type; b=YrWL/W4z7nYgFenYN+tLpZ67Az9SPw1/sVz7hHb6X/fPr5hjRAkQAUf/m+xfFaPogHls6oM5t3BTCVanG0fELjPYp+DQ7X5FKIsO7jzuYA5at3rsw+64hdCRsODhQBDmrRkPQKvCbrcCCFIcdTT9+e0XxXxq9fvUquw61i9ngl4=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=pobox.com; spf=pass smtp.mailfrom=pobox.com; dkim=pass (2048-bit key) header.d=pobox.com header.i=@pobox.com header.b=LdoHNGfp; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b=KlFpXFAI; arc=none smtp.client-ip=202.12.124.157
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=pobox.com
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=pobox.com
Authentication-Results: smtp.subspace.kernel.org;
	dkim=pass (2048-bit key) header.d=pobox.com header.i=@pobox.com header.b="LdoHNGfp";
	dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="KlFpXFAI"
Received: from phl-compute-05.internal (phl-compute-05.internal [10.202.2.45])
	by mailfhigh.stl.internal (Postfix) with ESMTP id E1ACF7A0018;
	Fri,  8 Aug 2025 10:53:13 -0400 (EDT)
Received: from phl-frontend-01 ([10.202.2.160])
  by phl-compute-05.internal (MEProxy); Fri, 08 Aug 2025 10:53:14 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pobox.com; h=cc
	:cc:content-type:content-type:date:date:from:from:in-reply-to
	:in-reply-to:message-id:mime-version:references:reply-to:subject
	:subject:to:to; s=fm2; t=1754664793; x=1754751193; bh=g2MC3Wgs+e
	pnHCLIxiA9GNeT+oLnlvOtksvoHKNo5IU=; b=LdoHNGfpcKu6NtY9tmTXpaB9GZ
	qvJ9aAbq7UwLeiB49DwuqigZCT7pIytDkK8+/NcXrwVPCSDUmPIzoYQhq2j6smqC
	XZopdWkWWvzekwkJ6xVi4zmxh8zgJX1hESMqii8bRhgUkmZjJp7t/7IT0jGr4/Z3
	ruEGFPYS6E5FXmI0nPErX0LzcwxoI48DPbhLsou5L7TPzdZe18dAe7q16MKD780P
	xWfCLK9iLHqhHBCuLFiitoKy1Te0Qf4xGEz4oLSAx/t8dQ6O6GaqBtGGGFZmNrNy
	nHT4UlSadGt1HVEE2AmI0e1KFSxKrEqiFvgVhZQDrLy3b1UD6tYfsTNTIk8Q==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=
	messagingengine.com; h=cc:cc:content-type:content-type:date:date
	:feedback-id:feedback-id:from:from:in-reply-to:in-reply-to
	:message-id:mime-version:references:reply-to:subject:subject:to
	:to:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm3; t=
	1754664793; x=1754751193; bh=g2MC3Wgs+epnHCLIxiA9GNeT+oLnlvOtksv
	oHKNo5IU=; b=KlFpXFAI3/Dcm3lk5L+TIsZJ/sd+oLbq7fIrxUy8Nx2oASLCx1o
	+6opwkrJlZt/KDgeylVOA5cHkzE5Solxgj6b7kpZUScazMzDwHCT4BAtQZ5I0rOz
	R9pasqTa6HoC7GkPVLCNvEtVNtM7BaAdwW+8swE/YQ/U2wXQvmsiK+YS8gALeKHg
	3CH423wsw7i3IJrVlt+JeAmfSe+31ZbEO4Xsmq2cEazMNeBekif8O0h6lOVfHIut
	m2PWt0k7x3yq8OXwsOdhV93koqjrKsDfUtXp5ECj51TfhmW6EKH/w+kgnTrwH8Ql
	rZlt1XiJZ3jC4pS+gmi3u3LOMpMubm4HJtw==
X-ME-Sender: <xms:WQ-WaCFOUYy7XSP_5QRobpo-i6hHaqZiBB-59kYEAOyF9ZmPq7qGwg>
    <xme:WQ-WaASoyAI_vuOsuzFd6EOVNSjMhzwDktXsr-uhmLwa7P9yqcvsojPmh3h0gt6Qr
    6_BECify2uzO8Zzow>
X-ME-Received: <xmr:WQ-WaHw__EaN5EaEyxBWK_6yck_Q-fFHwrHAot0sF471rQhYFK1C3rjjDQg_5C39qErLvR1s7s6OtlYNQJbNScZ5UeiPkFNYtAey-zE>
X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeffedrtdefgdduvdeguddtucetufdoteggodetrf
    dotffvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfurfetoffkrfgpnffqhgenuceu
    rghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujf
    gurhephffvvefujghffffkfgggtgesthdtredttdertdenucfhrhhomheplfhunhhiohcu
    vecujfgrmhgrnhhouceoghhithhsthgvrhesphhosghogidrtghomheqnecuggftrfgrth
    htvghrnhepfeevteetjeehueegffelvdetieevffeufeejleeuffetiefggfeftdfhfeei
    geeinecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepgh
    hithhsthgvrhesphhosghogidrtghomhdpnhgspghrtghpthhtohepkedpmhhouggvpehs
    mhhtphhouhhtpdhrtghpthhtohepuhhsmhgrnhgrkhhinhihvghmihdvtddvsehgmhgrih
    hlrdgtohhmpdhrtghpthhtohepghhithesvhhgvghrrdhkvghrnhgvlhdrohhrghdprhgt
    phhtthhopegsvghnrdhknhhosghlvgesghhmrghilhdrtghomhdprhgtphhtthhopegthh
    hrihhstghoohhlsehtuhigfhgrmhhilhihrdhorhhgpdhrtghpthhtoheptghhrhhishht
    ihgrnhdrtghouhguvghrsehgmhgrihhlrdgtohhmpdhrtghpthhtohepmhgvsehtthgrhi
    hlohhrrhdrtghomhdprhgtphhtthhopehpshesphhkshdrihhmpdhrtghpthhtohepghhi
    thhsthgvrhesphhosghogidrtghomh
X-ME-Proxy: <xmx:WQ-WaEf-_hB0Q5wfRv4K4iyDCOMhCrOilRmCIl0tDtoJoTBH97pMRw>
    <xmx:WQ-WaCMMMjFh8U6Ubb-T9y3O7isdXAPBtKyZYrR7miaaSlzwJ34AhA>
    <xmx:WQ-WaHvtPfas770BoWWbZdC_cfHuQFaP9QZfLhqN5iAMPjRdV5KPrg>
    <xmx:WQ-WaLB_0kXAFBWDeS1XsfS3dOnHT5gJ0hW32h6wHJ948HWkv6KhFQ>
    <xmx:WQ-WaCRVD37yP0siYe6atI6t2DUA_-M_7n2lrpVS_WL7Z4aNzrK8vjGV>
Feedback-ID: if26b431b:Fastmail
Received: by mail.messagingengine.com (Postfix) with ESMTPA; Fri,
 8 Aug 2025 10:53:12 -0400 (EDT)
From: Junio C Hamano <gitster@pobox.com>
To: Usman Akinyemi <usmanakinyemi202@gmail.com>
Cc: git@vger.kernel.org,  ben.knoble@gmail.com,  chriscool@tuxfamily.org,
  christian.couder@gmail.com,  me@ttaylorr.com,  ps@pks.im
Subject: Re: [PATCH v6 0/3] refactor t1517 to focus on help output outside a
 repository
In-Reply-To: <20250808010651.591906-1-usmanakinyemi202@gmail.com> (Usman
	Akinyemi's message of "Fri, 8 Aug 2025 06:36:48 +0530")
References: <20250803020744.1037392-1-usmanakinyemi202@gmail.com>
	<20250808010651.591906-1-usmanakinyemi202@gmail.com>
Date: Fri, 08 Aug 2025 07:53:11 -0700
Message-ID: <xmqqldntkgq0.fsf@gitster.g>
User-Agent: Gnus/5.13 (Gnus v5.13)
Precedence: bulk
X-Mailing-List: git@vger.kernel.org
List-Id: <git.vger.kernel.org>
List-Subscribe: <mailto:git+subscribe@vger.kernel.org>
List-Unsubscribe: <mailto:git+unsubscribe@vger.kernel.org>
MIME-Version: 1.0
Content-Type: text/plain

Usman Akinyemi <usmanakinyemi202@gmail.com> writes:

> This series refactors t1517-outside-repo.sh to focus on testing
> `git subcmd -h` outside a Git repository. It does two things:

Thanks, Usman and Ben.  This iteration looks perfect.  Let's mark it
for 'next'.


From mboxrd@z Thu Jan  1 00:00:00 1970
Received: from mail-ed1-f41.google.com (mail-ed1-f41.google.com [209.85.208.41])
	(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
	(No client certificate requested)
	by smtp.subspace.kernel.org (Postfix) with ESMTPS id A4E628F6E
	for <git@vger.kernel.org>; Sat,  9 Aug 2025 14:46:21 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.41
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
	t=1754750783; cv=none; b=ebTG5L51arFvmaDpqrN6WPEhj+q2K3MAMyJ+buk0+YpMmCnFeUkb2xcnkUw0ivi0ilC2TwL322nBqLZu6d6J5+q0xnpOmjkX873mk1SCghay/HrRDrDaddDNpIB4lSBS/lK2oADA8tE3WMUVeYA8ioz7EF9UQzvXzxsoc6Dxna8=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
	s=arc-20240116; t=1754750783; c=relaxed/simple;
	bh=Fis44mRfn5STaaESAYWD71lP1DZAmT+qHuv/IMuIoYI=;
	h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject:
	 To:Cc:Content-Type; b=GTBe1MSfe+I5RKAxnsivJ71chJp1JpCXTP5o4m6nV/7yk2QpOwUgc4T+xq/R2JEnhJ8T6gJqk0qpGQ8zYx48OF1Fd0aCR6zZig7p5W27j4nWpA9AHaOoJF2aNXqAPYzxktkQoLfBd4pv80uRDcwMFjOe8kCdOGiXOVq+GVhDe1c=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=TeTJD7sZ; arc=none smtp.client-ip=209.85.208.41
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.b="TeTJD7sZ"
Received: by mail-ed1-f41.google.com with SMTP id 4fb4d7f45d1cf-615d0b11621so6981993a12.1
        for <git@vger.kernel.org>; Sat, 09 Aug 2025 07:46:21 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=20230601; t=1754750780; x=1755355580; darn=vger.kernel.org;
        h=content-transfer-encoding:cc:to:subject:message-id:date:from
         :in-reply-to:references:mime-version:from:to:cc:subject:date
         :message-id:reply-to;
        bh=U9V1rnLkKf3j6dztSNvOW9Ap0M6BXEjL7X+LCEfpcDI=;
        b=TeTJD7sZZVN+/FBlVUG0d5zZ6CvcA4wBeX/G29Vh5zZxws75jCWNZZm2zXQeSg0UVp
         0Gs1LvWXJpGmd3o3uDWGDrh8ARYPyH2t0sxzHvihMbW2cZRypucOWanycgHw0AkilKRC
         A52DPN79sEwIHKb5h12nU61GX8daEOAPMpjEsJ6BlMdCXh7ScbsMTQ8jwF49uIAezqhO
         g6aNCTnpv6EmfbgZi2woT9HFC01UFPmmvVRrmmmWl0atbrzFuQL5Wgxo0OolDLKGTfCe
         49hKDKzzV/QLbMIQQ5RzUKdPQHPUR7AMfU77Vzm69CPhqQvP/KLcZEddfsHNgVBI9/j1
         0blw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20230601; t=1754750780; x=1755355580;
        h=content-transfer-encoding:cc:to:subject:message-id:date:from
         :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc
         :subject:date:message-id:reply-to;
        bh=U9V1rnLkKf3j6dztSNvOW9Ap0M6BXEjL7X+LCEfpcDI=;
        b=W1oQObO6Ys33w0mJLFPyI6OyQWuIpsLrHhhW2C5Klain1pL1rgtE66FVcyhHFXmrH8
         Ode6N4MWSdRL9AMK+3/1FQnQj7PLKJy/9pAi7kYRmnGUgVGuvbysdlfkJQls+FXSDVIn
         cZ9Z3wjf0WPpplj58h7jXuPfpSleh+efdx5lEeJtG3tGpbOBikKoWGWT04ha0EVbdWXr
         ui6GZbKcmQSzUaBsr6GEe6rIiupwFSb7DUo7cAVApjKdpMWAn2a/JCT72vPfC2xKqGfk
         XSVueyD8xvMYpj02d25TkZdeC0c/wf5nYJZXoMNV7HUo4hsP6HxKDIQIQOe4Gxhi7N5y
         GYig==
X-Forwarded-Encrypted: i=1; AJvYcCXDh3CIlvQSUgTjLSvToB52oEiW2sWs/vynCwEl7NYbg+vygi02m1sm3bKlkDiOHcVLZRY=@vger.kernel.org
X-Gm-Message-State: AOJu0YxMSCw4qkQzzNwcAjDBb+6TAp6zaustQjhDFR+lmFEx6FbueZ6t
	pqPy1FC+5Kqn1o7Fs3efcgESxGUOjHWzuIF2hNOSbDSBmUUq8aE+rSpnvIJC6jfY6gBWavjJG+t
	QbY/WySK94v7l5zoaUVjfv6nFRd0F465QZt7o
X-Gm-Gg: ASbGncuSCRqjewR4GB/kDe8m46oWhKrT9tKh7qj5IlvK4e39KpPXP8O1zmbz1TnbxUj
	KtYf1JdjhNEa7CLpX2UAzqZuTKcXV39MQKm8m2tCIfQvN3s+14xcwy09Osu2E32DJlT8B8leAjs
	p9Md0LOcr8MiTWacNM0Yyw5ulTcwq7Tu9dNwZqEfqxoIiWP7hyXpMLBqaJRKgFaZeCyt1cRn1oG
	sH95OkvSJ2DciHR0Eer3oHHxgjCoFq/oQdu0slRQg==
X-Google-Smtp-Source: AGHT+IEqX0SVqLrsTxYJ2gf1PpW/pobqqHiHFGs5HalfCwHpNEAlSjrCIpZtzWTzH1W2Iw2vXQ4bPzSrWCkxA/5NX04=
X-Received: by 2002:a17:907:d0b:b0:af9:3f99:1422 with SMTP id
 a640c23a62f3a-af9a3c59269mr1121015066b.5.1754750779677; Sat, 09 Aug 2025
 07:46:19 -0700 (PDT)
Precedence: bulk
X-Mailing-List: git@vger.kernel.org
List-Id: <git.vger.kernel.org>
List-Subscribe: <mailto:git+subscribe@vger.kernel.org>
List-Unsubscribe: <mailto:git+unsubscribe@vger.kernel.org>
MIME-Version: 1.0
References: <20250803020744.1037392-1-usmanakinyemi202@gmail.com>
 <20250808010651.591906-1-usmanakinyemi202@gmail.com> <xmqqldntkgq0.fsf@gitster.g>
In-Reply-To: <xmqqldntkgq0.fsf@gitster.g>
From: "D. Ben Knoble" <ben.knoble@gmail.com>
Date: Sat, 9 Aug 2025 10:46:08 -0400
X-Gm-Features: Ac12FXxPdvodvPdUBQ8QTXA1szUP6RK8yRatEJocHJ6hAYyJcqGTBZU18lAtbQ4
Message-ID: <CALnO6CCRKuSw3FqqPisavafDrVR8H-8UtjjWWsK2oYeN1COLmQ@mail.gmail.com>
Subject: Re: [PATCH v6 0/3] refactor t1517 to focus on help output outside a repository
To: Junio C Hamano <gitster@pobox.com>
Cc: Usman Akinyemi <usmanakinyemi202@gmail.com>, git@vger.kernel.org, 
	chriscool@tuxfamily.org, christian.couder@gmail.com, me@ttaylorr.com, 
	ps@pks.im
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

On Fri, Aug 8, 2025 at 10:53=E2=80=AFAM Junio C Hamano <gitster@pobox.com> =
wrote:
>
> Usman Akinyemi <usmanakinyemi202@gmail.com> writes:
>
> > This series refactors t1517-outside-repo.sh to focus on testing
> > `git subcmd -h` outside a Git repository. It does two things:
>
> Thanks, Usman and Ben.  This iteration looks perfect.  Let's mark it
> for 'next'.
>

Excellent! In the recent "cooking" mail it looks like my series was
recreated atop this one, so I won't send another version just to drop
the fixup patch unless there are other comments to address.

--=20
D. Ben Knoble

From mboxrd@z Thu Jan  1 00:00:00 1970
Received: from mail-ed1-f54.google.com (mail-ed1-f54.google.com [209.85.208.54])
	(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
	(No client certificate requested)
	by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6BF3631A554
	for <git@vger.kernel.org>; Tue, 26 Aug 2025 15:57:29 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.54
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
	t=1756223851; cv=none; b=u20dH4HtCmfly7JJGWYZUYF+tau4icehBxBwUylZGVF++usJTbFhITquZ2xTqqaZVfOqv1vT5d3wxwMVT32YkxFI2H6uXp5fU4vbIQqDjE9V4rYI3//QhPcsJIKKHhr3zEcfQGfuc9sCfrjLc2yevzzvbGPThP7fWIsmlWi6UU0=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
	s=arc-20240116; t=1756223851; c=relaxed/simple;
	bh=5RC9+stS/YcnZVugMobZOYhjc8JDm5zTry3RiV6BmK8=;
	h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From:
	 In-Reply-To:Content-Type; b=IYnYLdi94y3OyQU33JqM76wQ4//7SuIT7rjk/dgjnNMjnUgqhN3vWFGfS+Xs2Lo73twpGG+wiBCBJ4ofPfQnP5GplTm5jqhfWUwZsQ2tkzFTveIiIZ3L+7TCNwiD75K2R44qIG/ao2dXNee8NHW8FPMX+ycts0QBOmYddAfYk6c=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=P8LM+3vU; arc=none smtp.client-ip=209.85.208.54
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.b="P8LM+3vU"
Received: by mail-ed1-f54.google.com with SMTP id 4fb4d7f45d1cf-6188b5ae1e8so6782891a12.0
        for <git@vger.kernel.org>; Tue, 26 Aug 2025 08:57:29 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=20230601; t=1756223848; x=1756828648; darn=vger.kernel.org;
        h=content-transfer-encoding:in-reply-to:from:content-language
         :references:cc:to:subject:reply-to:user-agent:mime-version:date
         :message-id:from:to:cc:subject:date:message-id:reply-to;
        bh=AaJlMowrOLTlMzSXxAq2oUAuJOuc2KAcTK2K84VDX2o=;
        b=P8LM+3vU3jss2Vr/EY9LpBFTMy95TgJnO2QchvmPvsD+yvb7BPto5xm6tD43XLSWcs
         ueTPGGpK/j8y19w388zfNbMJMk1pa78Hxsxavm6u1TneBwdEEh3WC+MtavaARL1/siLE
         0xWYHqxqAlPEwgoUVzq43/RAajjtiXZInCxubormlHoU5MkcGu92KV/COEt56QYyUcKS
         AfKVC+OF9LOxeZHKPNiJ3GDqYtw4LYImRx9XvAKsM2vD4e3qMh0dXzcyXxwKfdGVvMoB
         Tu7/jb0haj5ngExG6WeTP15oTVCdSQAgtwXnGRM602vNMTMiLsql/Of86XPTtoxRJ1Rr
         O+Cg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20230601; t=1756223848; x=1756828648;
        h=content-transfer-encoding:in-reply-to:from:content-language
         :references:cc:to:subject:reply-to:user-agent:mime-version:date
         :message-id:x-gm-message-state:from:to:cc:subject:date:message-id
         :reply-to;
        bh=AaJlMowrOLTlMzSXxAq2oUAuJOuc2KAcTK2K84VDX2o=;
        b=tlTsPk1s6o8Q5hMeGxcj8StsnCN53brMTZNcqLWjZyic8TeayT0AxOtusEHZcvNpJy
         roiZr/PoAlgopHkrp+2+SeRoTNIfE/HQYL5XKPiXotqf+D6hn/7vzXJL7KsjuhCKu7Ja
         ikKG9z9GIaOazYHZ5glL4lh11IyvF69lhypIwYjZz4aGFaOVc+FuuK4XjL95Kq3RF7xj
         it02lc7suBavOvqaZFczhllgDjx+Bs4DWkIB1XHugytOADdlEN7veQgHn8K/al7k+LQO
         mSW++K1wYYUiK2f29F1I85z46krFwtfwLoqHTbQvnSt4q+jz9MEQQWXV2OuzXNhzIw//
         fR4Q==
X-Forwarded-Encrypted: i=1; AJvYcCV+x4L06IcKVsZnU534E6NhRMxzaQ0fc/buaKqMStkdpaTHZzmOoF3ppBi7ARFojeHVmhc=@vger.kernel.org
X-Gm-Message-State: AOJu0YyRQXNPMJB+MmowllC7VLyoZz76Qo/1Cp/knM+quyTBliWw1vkT
	ILowlufUekNuMA5UV9LvsS+KEijOCtKMmTUcs62OGZRfr+q5bQLneGFU
X-Gm-Gg: ASbGnctUyIMoKeGNXBZ/QGv6CNTRj9OMkh2KQ2nu/i1qAEqC30XK5rroMzl0ku20pji
	waaipGfGzf8OzvMGqCTs4HVFaGwFc2pKYwv/XX7fyEaupOsJB2BMyUJtK33+jzIG4cIe8qHrIeC
	GSE69I81URGq2s0ezxe7kyOThVJc18micIubq47PH1MQRZde9E/NUDC5zGdTSupTulsvI9kl+eH
	5trYlPXgLEVnxv2JMpBxszD6kGp1dAw6bx7s6C69J4a76vW7HLqKyDoqKeOxnuxW05o0PuRL1+C
	/Icjsx4NuuPWgrxi49i90yy98RyFqTzqlAZPShgUwqjL13lr5/I+NEdvF7SsfPrWkP9arR3Tlmk
	Ii2evD7ohDKUdZaOmDsexk+uvklFUsNNpSwh6GLqXm8xtGd6fynF/aE9X9cdhmqtG1zGW+QQWM7
	hrVQ==
X-Google-Smtp-Source: AGHT+IEyOlOmookiP6kf2FlcCbBkKwvfjYaGBQEdGlCeIDONWUrLQxnYpI5Vh4517hWohcb37/BUXQ==
X-Received: by 2002:a17:907:26c8:b0:afc:cc64:86da with SMTP id a640c23a62f3a-afe28ff788fmr1480503266b.26.1756223847430;
        Tue, 26 Aug 2025 08:57:27 -0700 (PDT)
Received: from ?IPV6:2a0a:ef40:7a5:4701:8cee:45ed:2bd5:e17c? ([2a0a:ef40:7a5:4701:8cee:45ed:2bd5:e17c])
        by smtp.gmail.com with ESMTPSA id a640c23a62f3a-afe81ebf53bsm448945366b.15.2025.08.26.08.57.25
        (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128);
        Tue, 26 Aug 2025 08:57:26 -0700 (PDT)
Message-ID: <370f11e1-b335-4111-912c-94429c5018d6@gmail.com>
Date: Tue, 26 Aug 2025 16:57:25 +0100
Precedence: bulk
X-Mailing-List: git@vger.kernel.org
List-Id: <git.vger.kernel.org>
List-Subscribe: <mailto:git+subscribe@vger.kernel.org>
List-Unsubscribe: <mailto:git+unsubscribe@vger.kernel.org>
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird
Reply-To: phillip.wood@dunelm.org.uk
Subject: Re: [PATCH v4 1/2] t/t1517: automate `git subcmd -h` tests outside a
 repository
To: Usman Akinyemi <usmanakinyemi202@gmail.com>, git@vger.kernel.org
Cc: gitster@pobox.com, chriscool@tuxfamily.org, christian.couder@gmail.com,
 me@ttaylorr.com, ps@pks.im
References: <xmqqcya63cqx.fsf@gitster.g>
 <20250721115519.140361-1-usmanakinyemi202@gmail.com>
 <20250721115519.140361-2-usmanakinyemi202@gmail.com>
Content-Language: en-US
From: Phillip Wood <phillip.wood123@gmail.com>
In-Reply-To: <20250721115519.140361-2-usmanakinyemi202@gmail.com>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit

Hi Usman

On 21/07/2025 12:55, Usman Akinyemi wrote:
> 
> diff --git a/t/t1517-outside-repo.sh b/t/t1517-outside-repo.sh
> index 6824581317..9fcebb7d94 100755
> --- a/t/t1517-outside-repo.sh
> +++ b/t/t1517-outside-repo.sh
> @@ -110,8 +110,29 @@ test_expect_success LIBCURL 'remote-http outside repository' '
>   test_expect_success 'update-server-info does not crash with -h' '
>   	test_expect_code 129 git update-server-info -h >usage &&
>   	test_grep "[Uu]sage: git update-server-info " usage &&
> -	test_expect_code 129 nongit git update-server-info -h >usage &&
> -	test_grep "[Uu]sage: git update-server-info " usage
>   '
>   
> +for cmd in $(git --list-cmds=main)

This lists all the git commands in $PATH which is causing "make test" to 
fail when I run it locally as it is testing all my local "git-*" scripts 
most of which apparently fail this test. If there isn't already we 
should add a option that lists the commands only in $GIT_EXEC_PATH and 
use it here.

Also when I run the test with '-i' it does not stop at the first 
failure. I'm not sure what's causing that as I thought 
test_expect_success should exit on failure even when it is called in a loop.

Thanks

Phillip

> +do
> +	cmd=${cmd%.*} # strip .sh, .perl, etc.
> +	case "$cmd" in
> +	archimport | cvsexportcommit | cvsimport | cvsserver | daemon | \
> +	difftool--helper | filter-branch | fsck-objects | get-tar-commit-id | \
> +	http-backend | http-fetch | http-push | init-db | instaweb.sh | \
> +	merge-octopus | merge-one-file | merge-resolve | mergetool | \
> +	mktag | p4 | p4.py | pickaxe | quiltimport | remote-ftp | remote-ftps | \
> +	remote-http | remote-https | replay | request-pull | send-email | \
> +	sh-i18n--envsubst | shell | show | stage | submodule | svn | \
> +	upload-archive--writer | upload-pack | web--browse | whatchanged)
> +		expect_outcome=expect_failure ;;
> +	*)
> +		expect_outcome=expect_success ;;
> +	esac
> +	test_$expect_outcome "'git $cmd -h' outside a repository" '
> +		test_expect_code 129 nongit git $cmd -h >usage &&
> +		echo "Hello" &&
> +		test_grep "[Uu]sage: git $cmd " usage
> +	'
> +done
> +
>   test_done


From mboxrd@z Thu Jan  1 00:00:00 1970
Received: from mail-ej1-f51.google.com (mail-ej1-f51.google.com [209.85.218.51])
	(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
	(No client certificate requested)
	by smtp.subspace.kernel.org (Postfix) with ESMTPS id 84EFC18C034
	for <git@vger.kernel.org>; Thu, 28 Aug 2025 13:47:49 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.218.51
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
	t=1756388871; cv=none; b=HHihKg4ilRrUO+CS3QUAeLlD2iU2x5TWRGDKjqH8xftVmSo1OfVZkFGKzrSRHUfC+cb4QcyXwHjPwrvh/H8oH9O6F372+lVruFUKUvrH+SiIh08vsQOV7SrydGNHL+Tu1Rcpw0ye5n2OmZXyaVOju+TPesESHUUhuKucv5Lzcic=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
	s=arc-20240116; t=1756388871; c=relaxed/simple;
	bh=SmdZGAU0Q/fPv/rDMq52rQh2AtlzDSh0t06TPeQWJ1I=;
	h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject:
	 To:Cc:Content-Type; b=JnC0FiNCpn+5XeKqX/yX8QEYmSbsKi48VyWaB9qvlISgwRMTm2UOzF/GtSUeIgyW5v51lFY0jkPdkEquqnPHGihrGljPUic/XFjNwFC34bf0nL/tR9j44gJQ0BN8B3If0QFk/iKdPhCZqLC/HFlc4zH0LISYBbBqx4QdPSjZAI4=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=EsxP4IYu; arc=none smtp.client-ip=209.85.218.51
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.b="EsxP4IYu"
Received: by mail-ej1-f51.google.com with SMTP id a640c23a62f3a-afe84202bc2so132285166b.2
        for <git@vger.kernel.org>; Thu, 28 Aug 2025 06:47:49 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=20230601; t=1756388868; x=1756993668; darn=vger.kernel.org;
        h=content-transfer-encoding:cc:to:subject:message-id:date:from
         :in-reply-to:references:mime-version:from:to:cc:subject:date
         :message-id:reply-to;
        bh=WMFOHHMvjf3DvDjQ06nLPcrUvtqPUwicW0sjMD1Q9wI=;
        b=EsxP4IYuz3qdeUJ2w/s2fG9Bll6MmoRJy+qioUmArzHlNN3+wQbacvRjivV6NP2tDR
         QwTUqMAziSVFrcHWFFZ/qX7Lbva7IU/6yW1MFbTn9riYf42COjAv7RkoS2ABjc+hLHhd
         Eaz1+CkYHNjO5CGBb+F4h4eLGZ8bzWzaHCdJZo7pI7bw9JI8Bww//YEa2ooRzJWYGqsM
         DYLP4Cs5wNRU0dau86O9TMW/KWJs0VSe4yJCAxziEC9R3haAn9H/7gWu91iaQX/3eAxd
         mLTyifb+PhYi3C5Cjcz6JtV0LYY2UliqHAEABmCI73NGXNuwg7HMs/K8Qb/A1Mc1YuaR
         rfSg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20230601; t=1756388868; x=1756993668;
        h=content-transfer-encoding:cc:to:subject:message-id:date:from
         :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc
         :subject:date:message-id:reply-to;
        bh=WMFOHHMvjf3DvDjQ06nLPcrUvtqPUwicW0sjMD1Q9wI=;
        b=jEm/NCZt91JPO4E3MKvUMtiw5uOUgMgmbZ6piAwLH3RxJCPJxKGAlcsPq+vH6ZBXHo
         0vbS+7TUqV5PDuegH+Lx2GRmEqmbfszDz2Nms+FwQFvFTAO5kWwCAXM7ndsVn+Hcrv6M
         MJN1CZy/P9pVilK8PpocFAW+nMIiPYCRhX1P5c9Hm+idaDXCEy5Y069OzxNiAXTM2PaZ
         RKLR56Q9dameroeQ0ENTinZybdx1NH0kD1+M1AjQ2aQSpT3tQ21qm5I8qW3PpXNC72Xi
         t8HKq2ISj63VGgssJjTEfz3hHLuJyBR/iN/NHUMDjTcVIczD3m2iseQwz9BJn63IwP1Y
         4KGg==
X-Forwarded-Encrypted: i=1; AJvYcCUreBqlt37FCczwOF1UwkLlNlF8KbuQg42BUW5J0EIKesd27g6TtyTLEeI5RYUlqOMEgKc=@vger.kernel.org
X-Gm-Message-State: AOJu0Yxq6KdZaEPQnJUIC0PRsq+1dbm4hJROaMiQPMct+BCc65NXvWfx
	pFaoYe3PThOI/irwqUl+0DnSxqQsrqkLRuNTI3NsO+WNQ7ig5dVLlXwjxbX++mO0uLY7nMyfZkf
	0rAO+Ffp5Z9gZ5nNThdkcsT2YQ30xHOI9Ug==
X-Gm-Gg: ASbGncvX6LL5XQYmT+XY31W/SorW0rmIjlF1zFolGAwXPQlrFgkJZLsKqcPmGmbGvB2
	kwAOisVa+5mJ4brkvwz8VkvW8RbVEC+OKC7nKxKA5DV1pEfMfBamriWkN7TOhvsouR2xVP4Itgi
	TtPg9h42QG7oCMIEU+G2+QyP7GC/o3UQIZP2O/pfd09PeoAlA2fH6MtyMRxXL8uhGmOhzjesgM6
	YVWnlPQ2isPoAWi7YYX+IQSbN7Q/GsFXgpD01IwcbRAmRUkpX/xF9MQiLDn5G4=
X-Google-Smtp-Source: AGHT+IGQZDBBBYASq79nZQjCWO37udDbnaR9Eorph2lfWK7No1XbwFCBkPKgKcOAxQ5GsZB91vhfHVb3zUxabwPkdyY=
X-Received: by 2002:a17:907:3daa:b0:afe:c9c4:ac9d with SMTP id
 a640c23a62f3a-afec9c5d5e6mr522475166b.51.1756388867518; Thu, 28 Aug 2025
 06:47:47 -0700 (PDT)
Precedence: bulk
X-Mailing-List: git@vger.kernel.org
List-Id: <git.vger.kernel.org>
List-Subscribe: <mailto:git+subscribe@vger.kernel.org>
List-Unsubscribe: <mailto:git+unsubscribe@vger.kernel.org>
MIME-Version: 1.0
References: <xmqqcya63cqx.fsf@gitster.g> <20250721115519.140361-1-usmanakinyemi202@gmail.com>
 <20250721115519.140361-2-usmanakinyemi202@gmail.com> <370f11e1-b335-4111-912c-94429c5018d6@gmail.com>
In-Reply-To: <370f11e1-b335-4111-912c-94429c5018d6@gmail.com>
From: "D. Ben Knoble" <ben.knoble@gmail.com>
Date: Thu, 28 Aug 2025 09:47:35 -0400
X-Gm-Features: Ac12FXx4_vx6fWHEW1vzeiyzuqUDioUc5ci_jac6k8hbo4cjWkeZmOhnC1fSnWc
Message-ID: <CALnO6CBbEB=94YsZn8vtjcwYENuMhMdg_wb2RbQunVCxnf53jQ@mail.gmail.com>
Subject: Re: [PATCH v4 1/2] t/t1517: automate `git subcmd -h` tests outside a repository
To: phillip.wood@dunelm.org.uk
Cc: Usman Akinyemi <usmanakinyemi202@gmail.com>, git@vger.kernel.org, gitster@pobox.com, 
	chriscool@tuxfamily.org, christian.couder@gmail.com, me@ttaylorr.com, 
	ps@pks.im
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

On Tue, Aug 26, 2025 at 12:04=E2=80=AFPM Phillip Wood <phillip.wood123@gmai=
l.com> wrote:
>
> Hi Usman
>
> On 21/07/2025 12:55, Usman Akinyemi wrote:
> >
> > diff --git a/t/t1517-outside-repo.sh b/t/t1517-outside-repo.sh
> > index 6824581317..9fcebb7d94 100755
> > --- a/t/t1517-outside-repo.sh
> > +++ b/t/t1517-outside-repo.sh
> > @@ -110,8 +110,29 @@ test_expect_success LIBCURL 'remote-http outside r=
epository' '
> >   test_expect_success 'update-server-info does not crash with -h' '
> >       test_expect_code 129 git update-server-info -h >usage &&
> >       test_grep "[Uu]sage: git update-server-info " usage &&
> > -     test_expect_code 129 nongit git update-server-info -h >usage &&
> > -     test_grep "[Uu]sage: git update-server-info " usage
> >   '
> >
> > +for cmd in $(git --list-cmds=3Dmain)
>
> This lists all the git commands in $PATH which is causing "make test" to
> fail when I run it locally as it is testing all my local "git-*" scripts
> most of which apparently fail this test. If there isn't already we
> should add a option that lists the commands only in $GIT_EXEC_PATH and
> use it here.

That should only happen if you set GIT_TEST_INSTALLED or something,
right? Or maybe some even more exotic setup: even with my
distro-installed Git, the command doesn't list my git-* scripts in
$PATH or installed extensions (like git-when-merged).

> Also when I run the test with '-i' it does not stop at the first
> failure. I'm not sure what's causing that as I thought
> test_expect_success should exit on failure even when it is called in a lo=
op.

That's odd: when I make some modifications that cause a failure and
run with "-i," it does stop early. Hm.

Thanks for looking carefully! I'm personally having a hard time
reproducing the issue though :/

--=20
D. Ben Knoble

From mboxrd@z Thu Jan  1 00:00:00 1970
Received: from mail-wm1-f49.google.com (mail-wm1-f49.google.com [209.85.128.49])
	(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
	(No client certificate requested)
	by smtp.subspace.kernel.org (Postfix) with ESMTPS id 1C752261B9A
	for <git@vger.kernel.org>; Fri, 29 Aug 2025 13:06:01 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.49
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
	t=1756472764; cv=none; b=lX+pVTK5LmfiC34HijiiSx1gqb6NbOqNSGCikwBlmq7TXYqIUqr/I5aStTLM6M/Hzc369iQtbD/lXBmaU+7wT3StV4+6LYFMBT2755GfxNDoleMECoq7pw+40Z8LALFAzL+Bad6ag+jBNf0gSfODojVKpbVwCY/iI8qHpW/SvBY=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
	s=arc-20240116; t=1756472764; c=relaxed/simple;
	bh=fX6z6kdOer0E5Vucuf3BKYC7CrwexYqU+urN6heMY9c=;
	h=From:Message-ID:Date:MIME-Version:Subject:To:Cc:References:
	 In-Reply-To:Content-Type; b=Zi7YoGxX2JUCC1xGqZciLONCxk9GlNe+fg9w4UJZUlX8zQfFmKxJjkNBdTjVl7fjRZegp4S269ni+GsWW29VdWwNXDuidKni7K3TKrtuh1RcWvE3DkyiT6luzF3GJUxWbm0yqHlrWDsU37ANno5szdqBhrZF1UhIdPDHNrnQRCE=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=R+x3hoXI; arc=none smtp.client-ip=209.85.128.49
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.b="R+x3hoXI"
Received: by mail-wm1-f49.google.com with SMTP id 5b1f17b1804b1-45b7d485173so10181075e9.0
        for <git@vger.kernel.org>; Fri, 29 Aug 2025 06:06:01 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=20230601; t=1756472760; x=1757077560; darn=vger.kernel.org;
        h=content-transfer-encoding:in-reply-to:content-language:references
         :cc:to:subject:user-agent:mime-version:date:message-id:from:from:to
         :cc:subject:date:message-id:reply-to;
        bh=tyM8WTfd24saRUo2v/SV3CyeFM7A7vHkPkVSo0G4DIs=;
        b=R+x3hoXIL80iWmCGiUtXoqpugroaR+M40gpLvOaofDzBydLXrHSpx1PCZCUnEENT40
         XSxdIRdTAyWJzPKiOmEmro4mmP4+A7lYpQmhz2+HFdm+Pb0emdV+AHchCDSlNk855oqt
         T9reUohw75wZapESjVVKN0lm+Dg6YMdxZXDtBEOTTsvaVu6gMo6lQp8/7U4p7+xDo0iu
         GkXw4kTJzUARMD4594klD9oy5w0nHPWEXkzKg+BeMAI67ClcBRLSfCxh+DctB9Vdd8zn
         pnXNuOFYMD6ErkHTWQHUABVBGOfT8YFM+a/AgbVEqV8TnGqwrEi5vvMZ1fGdRsq0XUkk
         D5yw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20230601; t=1756472760; x=1757077560;
        h=content-transfer-encoding:in-reply-to:content-language:references
         :cc:to:subject:user-agent:mime-version:date:message-id:from
         :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to;
        bh=tyM8WTfd24saRUo2v/SV3CyeFM7A7vHkPkVSo0G4DIs=;
        b=ee9JfDJNVZ4uTPidqwrf9CvuY2YQjLliwMEisj9+xnZW94tk8JSFjj/KwTVwIv+JAv
         CyT7C7ZWtARW8xU1mlLpPnnr1Ed7Fxe7moHzWf9hSzKqsU1T+fsehltL+X+ycLQWaScS
         jjNGDwcKDGNai8qQQxbxviyIiYfuQL2lQwPhbVmLuswchCMfrdaOR7tUwr57+x/ANiXl
         nBh1MNdfkAe8vFvK/5zbXihTHTfWiqnlCOTp34V1SukN7Sq7nYKpssYau99GUZ+CDN2o
         0mslKnlZ/Tebu3K0f5R8tBxPyRftIvm+ozdxxMNZZXoHzdkDh8boyISvNiu7ArAg68eX
         jPHA==
X-Forwarded-Encrypted: i=1; AJvYcCVmPFq/+FFaUNvbN8UcyTTC/+1iqqO63J5mrlua9xSRyheUytNUEMjx3LXL5BXSJKxGHkM=@vger.kernel.org
X-Gm-Message-State: AOJu0YwBBL5e6uyp2nmPXBCyn3Ve9j+V923QTzBVu5FAHBWq6nKPnD/J
	wLJ1bOUls7GvAheGCuP4DfIGdbP8p/oKnkbDul64Nkj63ao0YMHoePcZzr7Wnw==
X-Gm-Gg: ASbGnctkMrxSGLJ5ubd/dCH9MTJ9YkXUAXVfmgBtjvd+wk+JuxGfbLLSrKK9N+x1m3K
	106VktxEVZ7C9wwRMHIidE2AGZBL92oKwNYnU7d083/ftt3x/2/sxl0TCcDIRd0P8wI+cRYmGVa
	22zB0gYHCdNKI5atPiT2ep1IqzWJyR20qBJ5OrjXvDgvwk42J9/ZInPwJPSwa/J8hyt5o9E64wm
	9X5qF0e0MlhOMu6Ekkjn5TRXuLxTGmxv6FTtgbil0ivWHCq/QnpRhZ15LbhYViEDlBFZjnP6g5d
	589vpu/VfzeY8JvqI0e+3N/sNuk1OBm7BPt9lGHaCRRenQdqNgefuw86V6JZ/3P+NTGx6HnPEzd
	anVVowmPLVfH20vRSDTG4f0gM0pIj+u1f8Fo+oDF7jKjtCbUt2u7FNiLs0wYLxu2MCGfzFrFggh
	dT
X-Google-Smtp-Source: AGHT+IFrsL47RrNgNU68sLHGNUypQqldFRTErAfX4gRP2V+l3aY+qyKhz4+6fzVla4WIT3mV4LLJcw==
X-Received: by 2002:a05:600c:1386:b0:45b:69c0:1909 with SMTP id 5b1f17b1804b1-45b69c01d6cmr100747805e9.8.1756472760072;
        Fri, 29 Aug 2025 06:06:00 -0700 (PDT)
Received: from ?IPV6:2a0a:ef40:7a5:4701:1c1d:4ebf:5a41:64b9? ([2a0a:ef40:7a5:4701:1c1d:4ebf:5a41:64b9])
        by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-45b83f86c8dsm344765e9.7.2025.08.29.06.05.59
        (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128);
        Fri, 29 Aug 2025 06:05:59 -0700 (PDT)
From: Phillip Wood <phillip.wood123@gmail.com>
X-Google-Original-From: Phillip Wood <phil@crinan.ddns.net>
Message-ID: <0548f4b2-6c36-4958-8725-5c9ac91e31e8@crinan.ddns.net>
Date: Fri, 29 Aug 2025 14:05:58 +0100
Precedence: bulk
X-Mailing-List: git@vger.kernel.org
List-Id: <git.vger.kernel.org>
List-Subscribe: <mailto:git+subscribe@vger.kernel.org>
List-Unsubscribe: <mailto:git+unsubscribe@vger.kernel.org>
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird
Subject: Re: [PATCH v4 1/2] t/t1517: automate `git subcmd -h` tests outside a
 repository
To: "D. Ben Knoble" <ben.knoble@gmail.com>, phillip.wood@dunelm.org.uk
Cc: Usman Akinyemi <usmanakinyemi202@gmail.com>, git@vger.kernel.org,
 gitster@pobox.com, chriscool@tuxfamily.org, christian.couder@gmail.com,
 me@ttaylorr.com, ps@pks.im
References: <xmqqcya63cqx.fsf@gitster.g>
 <20250721115519.140361-1-usmanakinyemi202@gmail.com>
 <20250721115519.140361-2-usmanakinyemi202@gmail.com>
 <370f11e1-b335-4111-912c-94429c5018d6@gmail.com>
 <CALnO6CBbEB=94YsZn8vtjcwYENuMhMdg_wb2RbQunVCxnf53jQ@mail.gmail.com>
Content-Language: en-US
In-Reply-To: <CALnO6CBbEB=94YsZn8vtjcwYENuMhMdg_wb2RbQunVCxnf53jQ@mail.gmail.com>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit

Hi Ben

On 28/08/2025 14:47, D. Ben Knoble wrote:
> On Tue, Aug 26, 2025 at 12:04 PM Phillip Wood <phillip.wood123@gmail.com> wrote:
>>>
>>> +for cmd in $(git --list-cmds=main)
>>
>> This lists all the git commands in $PATH which is causing "make test" to
>> fail when I run it locally as it is testing all my local "git-*" scripts
>> most of which apparently fail this test. If there isn't already we
>> should add a option that lists the commands only in $GIT_EXEC_PATH and
>> use it here.
> 
> That should only happen if you set GIT_TEST_INSTALLED or something,
> right? Or maybe some even more exotic setup: even with my
> distro-installed Git, the command doesn't list my git-* scripts in
> $PATH or installed extensions (like git-when-merged).

Sorry for the confusion, I've just had another look and it turns out I 
had some rubbish laying around in the root of my repository which was 
causing the problem.

>> Also when I run the test with '-i' it does not stop at the first
>> failure. I'm not sure what's causing that as I thought
>> test_expect_success should exit on failure even when it is called in a loop.
> 
> That's odd: when I make some modifications that cause a failure and
> run with "-i," it does stop early. Hm.
> 
> Thanks for looking carefully! I'm personally having a hard time
> reproducing the issue though :/

Hmm, I'm not sure what was happening, at the time it looked like the 
loop was continuing but I can't reproduce it either now.

Thanks for taking a look and sorry for the noise

Phillip

From mboxrd@z Thu Jan  1 00:00:00 1970
Received: from mail-ed1-f45.google.com (mail-ed1-f45.google.com [209.85.208.45])
	(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
	(No client certificate requested)
	by smtp.subspace.kernel.org (Postfix) with ESMTPS id 44EF923BCF0
	for <git@vger.kernel.org>; Fri, 29 Aug 2025 13:22:53 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.45
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
	t=1756473774; cv=none; b=f879ZvFDsN1osNxJRx+93J/ObTolGj5ikYIVOgXbZLApcIihqke/r6Ybv8sTxzHga/Mn1Km7rB1JyfztJ/07ZZvF8ttd+wVuJHLMh+/KQEFKQt5OZQO4kI30gD7hpERCbwIqobSJHZSQTlgBZpMabI0DPHSJiYQEqnN8iwnwCJ8=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
	s=arc-20240116; t=1756473774; c=relaxed/simple;
	bh=JqNcqe23uev1y8sosDHmtdLUNkkbS7pIQFZ+A3BjkoQ=;
	h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject:
	 To:Cc:Content-Type; b=HlpHA0ipAUtHJ+7bSUwTf+Icl6tbBSmTpulqeDhz6oIkdp8b82fKc8J+3VDNk7fssKITLlA/npvbwqkyiObNB6mBfkwSahEjSzSbp+YS+REN0RUw7WyWVKekVkGBt3xYT+1rhlkqCLc0RCDrXdreKb0Uc+LsSdvwjXNV6YdgCzA=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=NbOOHdIZ; arc=none smtp.client-ip=209.85.208.45
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.b="NbOOHdIZ"
Received: by mail-ed1-f45.google.com with SMTP id 4fb4d7f45d1cf-61cdab7eee8so2859834a12.0
        for <git@vger.kernel.org>; Fri, 29 Aug 2025 06:22:52 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=20230601; t=1756473771; x=1757078571; darn=vger.kernel.org;
        h=content-transfer-encoding:cc:to:subject:message-id:date:from
         :in-reply-to:references:mime-version:from:to:cc:subject:date
         :message-id:reply-to;
        bh=JqNcqe23uev1y8sosDHmtdLUNkkbS7pIQFZ+A3BjkoQ=;
        b=NbOOHdIZgidwf6zHy1lb9V4Ds2EPkBmOmh8M3uVv6pZ2ady7WQ8Mw+J3ONA+nqmZ7Y
         ZlIaf3nqeGBqG+d7KBuKpTuOLoM4TThRwwcejtq84lcId7hNVdJ12zb9CY3tHauxcbGX
         fH5RFNUob+2GY7ThLk9Ck/p/WiQb9citSXWfUocuPEEHgqCdrbDyQWF8n7NLKZfl0tg2
         E5XwMncSXEaG9IGdh9wuQi+eXIykKLctCWPfMh4QISHOzGLmjNHF+XcEbR7EVCZO5R7h
         d4a1YdZh2RZqF94KK2k2i3U3IiLjBtkXfzaL4CC9UQUAJ4/lMOAm+C8g8UsnLFQcaRJG
         xEJA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20230601; t=1756473771; x=1757078571;
        h=content-transfer-encoding:cc:to:subject:message-id:date:from
         :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc
         :subject:date:message-id:reply-to;
        bh=JqNcqe23uev1y8sosDHmtdLUNkkbS7pIQFZ+A3BjkoQ=;
        b=wxnfZiY0EzXXO67nzGNB7CbxwGJepWQ7bP47slVPZ6tNY7qQAf3r31b9XT8KDSz7it
         lWaMyRnVDS0q8KRacJlUEdF1ZtANabF2Gaq/9pb5HAYrazydHE1lGT1OmNj3YZ6sIckb
         coV0x3yZ43wBz86hT9P5OqQ8JmvoK3WYk9ZeUlPfF5oiy4adSy5KTX+ORDY/MZkcS8fz
         aYEYGPebRkkMcBvimzQ3yAL9KANkuyCZnIGKRD31Qf+G0rXHDeQWPUoGpYlunhQAnp2W
         t5TVdbu0dYwM7OhxyeVLuQBFE1M9Huc/Tc6/OuGE6XItBS6rJ1sQkkx7FeHnXOifzjhl
         Y12g==
X-Forwarded-Encrypted: i=1; AJvYcCXRt79xwOs6OJME9vz160xvFrIt9pHh6eHK8z8a3taKrG6sT2rwWGwd62+YRKiXkzzNRJE=@vger.kernel.org
X-Gm-Message-State: AOJu0YyXFCYETxl2ytsDL0+ZpSYG2CAfprZMDHaeP83Bbz3wUwRZDyHe
	68hWNY/O4BUZevtFvT16YWMIaUFz8g3zHtWlkTKtlM2Lr2PwaJkvkm62TQWNtJmumlXMLjS2faO
	PTD8Dn+1DaKvH0dBAS8CYvnShZzLlsPU=
X-Gm-Gg: ASbGnctd9huV63oc4TY7tqX+GS8RUYrddvnE8gRuNu5Ggg+C1qbQlN0raqCqdZcn72t
	cfqyaydNncsNoQLEmXI+KqM0L/WSUa3nkgGLK+bhaVk677hbSTn9wJYYqQudfalb33tVjInNmld
	FzwsmnMx6zxWBbDcPb37zLPAmtxnep3ciRxug8Fr/Z8h89pPSKdfb55b0aobE8Fh5c9c5znRjao
	tn9MtolaCb9GkK9pXH+Vp2sJkgE0lkR61ijpCIqMw==
X-Google-Smtp-Source: AGHT+IF2LCcpo0zQpk9cn6S+Xa4ayfsrZR4NRyTO1VrFpkeo7TIpPZ34ODjceIzSmsfUnkLpClk178h3y2CQ4RgvR9s=
X-Received: by 2002:a05:6402:350d:b0:61c:e99d:fdef with SMTP id
 4fb4d7f45d1cf-61ce99e0697mr4191158a12.2.1756473771242; Fri, 29 Aug 2025
 06:22:51 -0700 (PDT)
Precedence: bulk
X-Mailing-List: git@vger.kernel.org
List-Id: <git.vger.kernel.org>
List-Subscribe: <mailto:git+subscribe@vger.kernel.org>
List-Unsubscribe: <mailto:git+unsubscribe@vger.kernel.org>
MIME-Version: 1.0
References: <xmqqcya63cqx.fsf@gitster.g> <20250721115519.140361-1-usmanakinyemi202@gmail.com>
 <20250721115519.140361-2-usmanakinyemi202@gmail.com> <370f11e1-b335-4111-912c-94429c5018d6@gmail.com>
 <CALnO6CBbEB=94YsZn8vtjcwYENuMhMdg_wb2RbQunVCxnf53jQ@mail.gmail.com> <0548f4b2-6c36-4958-8725-5c9ac91e31e8@crinan.ddns.net>
In-Reply-To: <0548f4b2-6c36-4958-8725-5c9ac91e31e8@crinan.ddns.net>
From: "D. Ben Knoble" <ben.knoble@gmail.com>
Date: Fri, 29 Aug 2025 09:22:39 -0400
X-Gm-Features: Ac12FXzW7ss7CQbfUISNqHuCPTuv92l_GNUI8j651v8NfLlp92kY3jSHQP2Fr4k
Message-ID: <CALnO6CBU0Y+JXdXsGgFR-XUMx=oheaQh3nEZpmidfwMxR6XYHQ@mail.gmail.com>
Subject: Re: [PATCH v4 1/2] t/t1517: automate `git subcmd -h` tests outside a repository
To: Phillip Wood <phillip.wood123@gmail.com>
Cc: phillip.wood@dunelm.org.uk, Usman Akinyemi <usmanakinyemi202@gmail.com>, 
	git@vger.kernel.org, gitster@pobox.com, chriscool@tuxfamily.org, 
	christian.couder@gmail.com, me@ttaylorr.com, ps@pks.im
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

On Fri, Aug 29, 2025 at 9:06=E2=80=AFAM Phillip Wood <phillip.wood123@gmail=
.com> wrote:
>
> Hi Ben
[snip]
> Thanks for taking a look and sorry for the noise
>
> Phillip

No worries, glad it worked out!

--=20
D. Ben Knoble

From mboxrd@z Thu Jan  1 00:00:00 1970
Received: from fout-b7-smtp.messagingengine.com (fout-b7-smtp.messagingengine.com [202.12.124.150])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(No client certificate requested)
	by smtp.subspace.kernel.org (Postfix) with ESMTPS id 88162101DE
	for <git@vger.kernel.org>; Fri, 29 Aug 2025 16:31:17 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=202.12.124.150
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
	t=1756485080; cv=none; b=i3D4udXlBr5SfTNzL9A7rFkmyBa0m7rnWXvYYVXFklqWYZh68OdNxJOzhZ8raYrEIvmGelJvPzxl1TX9hHAKP6szFSqd7yV6BNwq05VxmT7iq7G3uFDGcSzP7bK//6Pc3PqiyzkzNWojns7Ofo2V/CKtMBt8kVZtfVLoqh6ubCQ=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
	s=arc-20240116; t=1756485080; c=relaxed/simple;
	bh=Rj1mMjrgr277CT9As6baEQ/mCm+6VAChEwCPx4YgtW4=;
	h=From:To:Cc:Subject:In-Reply-To:References:Date:Message-ID:
	 MIME-Version:Content-Type; b=ZXCPGV4qwn1SSlEQwHcWYPhIlEVpkWXJJU8QGFMPJxcl/5wqbnIvxsZZBtl8IiscPVEymGheqcNPAbTunHoZSgkLXCsFsDDqTfXImoH+cJT6awnvSJbaGgsRauCafbG4d8I1XZMAH3KQHLkGRz0fm7+aSHrNUQb567w1bQ0PELA=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=pobox.com; spf=pass smtp.mailfrom=pobox.com; dkim=pass (2048-bit key) header.d=pobox.com header.i=@pobox.com header.b=DmjOmj1V; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b=QhYteuPh; arc=none smtp.client-ip=202.12.124.150
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=pobox.com
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=pobox.com
Authentication-Results: smtp.subspace.kernel.org;
	dkim=pass (2048-bit key) header.d=pobox.com header.i=@pobox.com header.b="DmjOmj1V";
	dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="QhYteuPh"
Received: from phl-compute-03.internal (phl-compute-03.internal [10.202.2.43])
	by mailfout.stl.internal (Postfix) with ESMTP id 4CBA61D0007F;
	Fri, 29 Aug 2025 12:31:16 -0400 (EDT)
Received: from phl-frontend-01 ([10.202.2.160])
  by phl-compute-03.internal (MEProxy); Fri, 29 Aug 2025 12:31:16 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pobox.com; h=cc
	:cc:content-type:content-type:date:date:from:from:in-reply-to
	:in-reply-to:message-id:mime-version:references:reply-to:subject
	:subject:to:to; s=fm3; t=1756485076; x=1756571476; bh=+dPwIZKxsk
	DmV3P+imT8nh1m/fGex49KmNUL9T0SlOw=; b=DmjOmj1VtDkzkqCXdYorKtD33H
	hCwrifz/f3Yt/f7lQijPOe2snZEBYu78Q7/1HK1xjwohXF2IfrN412mT7QtxGHIg
	DstBbkUn8jVeRwhnXhhEtarxtbRGE7msQ/7nWNyQuBXgXchr73/7a8GFC8faRzKv
	16Mfl6H2IMSTqpn6KkMfJxCh7ZdebZrmO1jweYe52/rgYUttihyAX1aqQmDN3Llp
	JuFmwiLsS0Wa1K8aPZ3xfokbC4FmKzdEGjlCUmVlWKu8OpPL2Alc+/lAze+6qrcS
	zuA4uYRysKkuFegEhzUKPYeS0KLeBePO0N025ou3nJ70KNZ/yjPfLlhCNZEA==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=
	messagingengine.com; h=cc:cc:content-type:content-type:date:date
	:feedback-id:feedback-id:from:from:in-reply-to:in-reply-to
	:message-id:mime-version:references:reply-to:subject:subject:to
	:to:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t=
	1756485076; x=1756571476; bh=+dPwIZKxskDmV3P+imT8nh1m/fGex49KmNU
	L9T0SlOw=; b=QhYteuPham+D9wGmNJJRjc01QkJG+AVPecpKte1RcScNlj8K2TY
	i3wxYwUDYTEjtm9VZxLHStwcZd+ldYxSuKgqmQdxvt63G3j47sWH/FOkeZNiD7OD
	a2t1mpQukDbYS+IGJxjmDfHpCGECQT2TZuPCWMrA+Y/Seb5DVBQRxqvfikTZPV3n
	PavFJO3KJ3MudofwgrI2fAf7Pe52TaeyFnsk8U+1MuJfrdky+BOorF0R3p+E8JMz
	LpHw90fjgg8sfG/b2dvJNtRol8p+hq2nkWENV8QXk/jWn9DLLddDHd+tD+5pe1Ul
	RMPHXL7sWtfT/qDDNAPLOy+aXoIjIz4Q7UA==
X-ME-Sender: <xms:09WxaMvGu1U_8M3Nnse_c1h73_K--krcWIwYQK9GfMSZL18kcFcilQ>
    <xme:09WxaG3ez97ndi7lxZ_gkwyiWcQTCqqELdotlz7hxX-GnS1nz-VEFf7AsgSQMRhWB
    MpDh-l8RTTJn1WGsg>
X-ME-Received: <xmr:09WxaPEZ1gvRwanqLGjkaNG3B8NXpDIPn4O3Ub79FhLYCsOkVy5TLXibhANgpQ2CbwEbXunvnwb_zmAXaqemFoOWSD-2J4HBcMolo9U>
X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeffedrtdefgddukeegvdeiucetufdoteggodetrf
    dotffvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfurfetoffkrfgpnffqhgenuceu
    rghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujf
    gurhephffvvefujghffffkfgggtgesthdtredttdertdenucfhrhhomheplfhunhhiohcu
    vecujfgrmhgrnhhouceoghhithhsthgvrhesphhosghogidrtghomheqnecuggftrfgrth
    htvghrnhepfeevteetjeehueegffelvdetieevffeufeejleeuffetiefggfeftdfhfeei
    geeinecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepgh
    hithhsthgvrhesphhosghogidrtghomhdpnhgspghrtghpthhtohepuddtpdhmohguvgep
    shhmthhpohhuthdprhgtphhtthhopehphhhilhhlihhprdifohhougduvdefsehgmhgrih
    hlrdgtohhmpdhrtghpthhtohepsggvnhdrkhhnohgslhgvsehgmhgrihhlrdgtohhmpdhr
    tghpthhtohepphhhihhllhhiphdrfihoohguseguuhhnvghlmhdrohhrghdruhhkpdhrtg
    hpthhtohepuhhsmhgrnhgrkhhinhihvghmihdvtddvsehgmhgrihhlrdgtohhmpdhrtghp
    thhtohepghhithesvhhgvghrrdhkvghrnhgvlhdrohhrghdprhgtphhtthhopegthhhrih
    hstghoohhlsehtuhigfhgrmhhilhihrdhorhhgpdhrtghpthhtoheptghhrhhishhtihgr
    nhdrtghouhguvghrsehgmhgrihhlrdgtohhmpdhrtghpthhtohepmhgvsehtthgrhihloh
    hrrhdrtghomhdprhgtphhtthhopehpshesphhkshdrihhm
X-ME-Proxy: <xmx:09WxaJv6Y-FgrF3zKllUtKomwuTcYMdYE6qfSRgeGjhthfxAoai5PQ>
    <xmx:09WxaKoGD_64X-TeX9cO5UOlEkzI6mwo0h31EVOfFcRq-uaYhH_fqQ>
    <xmx:09WxaIVUlcb8w63oNvHGjPPs19BXn-yWuVODy87Tmp3R17mF4azjfg>
    <xmx:09WxaK0AmVpifT0smJMKyNZcSo2VOWTWrTTEWOze7B7zsbA3DeGNJQ>
    <xmx:1NWxaJZZnAz7CxqUI3v_Smr1bmrlqHps_aDx98rBfWuoEGtUvrPodg-B>
Feedback-ID: if26b431b:Fastmail
Received: by mail.messagingengine.com (Postfix) with ESMTPA; Fri,
 29 Aug 2025 12:31:14 -0400 (EDT)
From: Junio C Hamano <gitster@pobox.com>
To: Phillip Wood <phillip.wood123@gmail.com>
Cc: "D. Ben Knoble" <ben.knoble@gmail.com>,  phillip.wood@dunelm.org.uk,
  Usman Akinyemi <usmanakinyemi202@gmail.com>,  git@vger.kernel.org,
  chriscool@tuxfamily.org,  christian.couder@gmail.com,  me@ttaylorr.com,
  ps@pks.im
Subject: Re: [PATCH v4 1/2] t/t1517: automate `git subcmd -h` tests outside
 a repository
In-Reply-To: <0548f4b2-6c36-4958-8725-5c9ac91e31e8@crinan.ddns.net> (Phillip
	Wood's message of "Fri, 29 Aug 2025 14:05:58 +0100")
References: <xmqqcya63cqx.fsf@gitster.g>
	<20250721115519.140361-1-usmanakinyemi202@gmail.com>
	<20250721115519.140361-2-usmanakinyemi202@gmail.com>
	<370f11e1-b335-4111-912c-94429c5018d6@gmail.com>
	<CALnO6CBbEB=94YsZn8vtjcwYENuMhMdg_wb2RbQunVCxnf53jQ@mail.gmail.com>
	<0548f4b2-6c36-4958-8725-5c9ac91e31e8@crinan.ddns.net>
Date: Fri, 29 Aug 2025 09:31:13 -0700
Message-ID: <xmqqa53inl7y.fsf@gitster.g>
User-Agent: Gnus/5.13 (Gnus v5.13)
Precedence: bulk
X-Mailing-List: git@vger.kernel.org
List-Id: <git.vger.kernel.org>
List-Subscribe: <mailto:git+subscribe@vger.kernel.org>
List-Unsubscribe: <mailto:git+unsubscribe@vger.kernel.org>
MIME-Version: 1.0
Content-Type: text/plain

Phillip Wood <phillip.wood123@gmail.com> writes:

>> That should only happen if you set GIT_TEST_INSTALLED or something,
>> right? Or maybe some even more exotic setup: even with my
>> distro-installed Git, the command doesn't list my git-* scripts in
>> $PATH or installed extensions (like git-when-merged).
>
> Sorry for the confusion, I've just had another look and it turns out I
> had some rubbish laying around in the root of my repository which was
> causing the problem.

I do not think this is something you should feel sorry about.

If you checked out and built 'seen' that invents new commands,
and then checked out 'next' that lacks these new commands without
first running "make clean" (relying on the mtime of the source will
cause rebuilding of necessary things), your build on 'next' will 
see "some rubbish laying around" that may cause the same issue, no?

As "test" is primarily to help developers, I think we should find a
way for this test not to be confused by "some rubbish laying around"
if possible.

Thanks.

From mboxrd@z Thu Jan  1 00:00:00 1970
Received: from mail-ua1-f43.google.com (mail-ua1-f43.google.com [209.85.222.43])
	(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
	(No client certificate requested)
	by smtp.subspace.kernel.org (Postfix) with ESMTPS id 915531F3B8A
	for <git@vger.kernel.org>; Sat, 30 Aug 2025 03:49:58 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.222.43
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
	t=1756525800; cv=none; b=r9ORn+4h/Otitbe2qLRFUhmeZnCQm/hq6AezlNrjgq6vGJpwHkIiblxSmn1Nw0pwYVRuQ2G3rJqHii3p7f8QMDmeJwRh3OUMXhKYb/e38CXe3mGshBnChhHfT/D7nLxLDNtWkIrT9uaD65KOY4/nmuHGfHsv9WSvPxDxvg2K+6M=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
	s=arc-20240116; t=1756525800; c=relaxed/simple;
	bh=oZyFyvmSWJ5+pRWVnAT/4R/EulUaiK0nMLnvXil0kAw=;
	h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject:
	 To:Cc:Content-Type; b=NbKUD3mDU9KN2koicjlIEwS9jNTZFfHJhnru1KZe/mbuVAO1FiC3cFPP8dr437nQgd0EmgaT3zhMz0fNSv4OioLYzeff499rVdifeQXTV7MzkMAV0H0ach1blvE2+dmiA2fFXj+gnAwMavboXgrGh5Q/2BxTGNvVsR0gCoLPXeM=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=dHUU8cW6; arc=none smtp.client-ip=209.85.222.43
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.b="dHUU8cW6"
Received: by mail-ua1-f43.google.com with SMTP id a1e0cc1a2514c-892196f0471so914880241.1
        for <git@vger.kernel.org>; Fri, 29 Aug 2025 20:49:58 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=20230601; t=1756525797; x=1757130597; darn=vger.kernel.org;
        h=cc:to:subject:message-id:date:from:in-reply-to:references
         :mime-version:from:to:cc:subject:date:message-id:reply-to;
        bh=oZyFyvmSWJ5+pRWVnAT/4R/EulUaiK0nMLnvXil0kAw=;
        b=dHUU8cW6TDBtQLoM3tVyF6BhWVQR0hqSNdI9E7FB8O3Eqm7Vri0gW2NUUky8tzUdU/
         FkOk4VPOQAWoKDRNyZw7JkpLME8soCT45AF7Y+CMCKetnJViDuNigtqmRvyQ4LM0e2O9
         8srnzr4G1kjN84+TzfTNqKCvwbJyXkjR5wcNEC6tbUWavAvmESRwo8f7kaYVBwMQhzbD
         HR+6zuTjLX3+836OzCQm+2yjnlebJv5CKKr8b6oB7eKqv1hffmu+yh5XZEzSXZ6YLOt8
         IxwDd0LL+HeQbOXwmULRIcwvBhHCo9Dol2PvQZP7Aysf6rt+5riYomSO3FQg25/z1Z4n
         8kLg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20230601; t=1756525797; x=1757130597;
        h=cc:to:subject:message-id:date:from:in-reply-to:references
         :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id
         :reply-to;
        bh=oZyFyvmSWJ5+pRWVnAT/4R/EulUaiK0nMLnvXil0kAw=;
        b=ky24q3QFmV66wicDW65XgISNSRLbe+x4fUFXMae2ZkWQ5Nt7uUQmEsFBEZaUpaUvY/
         jdFW4JEn0cLnl3GWrrS+/sPsM02vJuGKPTdb/XK+1EmvzsDMuTodumhoKcoibEF9lgd3
         wDa34v59UMAMt+nygZqczq2uvhpV0jUmno3gWPviNmedkhEF8iHVglaxroPHgfQHnndx
         IJVwn5Qyo8fZ9VMzjZHPCEcDsiWo3cRyKYa9cMV/Y5CPo33rDJjl07Z0zrqIxhia0tMN
         gee2ChjJUBhbVZQrOfDndVBkyhcrFp+GCUuZUovwF2zir3qf0i302cGt4j+N7Q54LMqg
         4TrA==
X-Forwarded-Encrypted: i=1; AJvYcCXaTMbGEZmnF2/qStWh+1fVFS1a10zMU8n1v/yrMjSI990UN1TuaR3hGWsalKdDknd1Yug=@vger.kernel.org
X-Gm-Message-State: AOJu0YzMQ+OsjtYsg1KWtew3drvmON7tV1OFWnXaEEmdxYL9KuJSUy2q
	T0U7ECOvq9aU+OorfEIHZrJJBRqzpDOU4X17V1uI/7AppbGUXf0mEtt5LUugekguC/ANjKP5M+N
	l0Q3TwmGAdgkUks1OkdbEzQ5EgKa4syc=
X-Gm-Gg: ASbGncsMzSi56s4L5IRIRG576vqNjhtegDuiSKQVvKA8YnpaOEXbjP8nB4zB8BmWUR5
	24iI+toA1iSX7rUwyoLSEAMcZhKZpLFq7n0CCC+xkW8wps5JLEW81zLCwWrJYAbdgmd/vrrE7SP
	afAyH/au6GqNWkywKIMTe0OEeaH6nfSKOlM5spNjxcsAjsfIclSa5/dJPx4Hdyui004JB/G++io
	Iuyy6I3JY7GN2pnPRL+VyBh5k+2pIU5bBLxQxgoXp4C6Ik8Yw==
X-Google-Smtp-Source: AGHT+IFxAkQJPIBhonqHlhsVP+VIpvuTuxyxxJscU+27qmTdXczB4hRo9Aq6IWsI1wY5Eg5MXypIv/+VL9W2HKTl0mA=
X-Received: by 2002:a05:6102:598e:b0:523:e248:c315 with SMTP id
 ada2fe7eead31-52b19a5e348mr226299137.13.1756525797272; Fri, 29 Aug 2025
 20:49:57 -0700 (PDT)
Precedence: bulk
X-Mailing-List: git@vger.kernel.org
List-Id: <git.vger.kernel.org>
List-Subscribe: <mailto:git+subscribe@vger.kernel.org>
List-Unsubscribe: <mailto:git+unsubscribe@vger.kernel.org>
MIME-Version: 1.0
References: <xmqqcya63cqx.fsf@gitster.g> <20250721115519.140361-1-usmanakinyemi202@gmail.com>
 <20250721115519.140361-2-usmanakinyemi202@gmail.com> <370f11e1-b335-4111-912c-94429c5018d6@gmail.com>
 <CALnO6CBbEB=94YsZn8vtjcwYENuMhMdg_wb2RbQunVCxnf53jQ@mail.gmail.com>
 <0548f4b2-6c36-4958-8725-5c9ac91e31e8@crinan.ddns.net> <xmqqa53inl7y.fsf@gitster.g>
In-Reply-To: <xmqqa53inl7y.fsf@gitster.g>
From: Usman Akinyemi <usmanakinyemi202@gmail.com>
Date: Sat, 30 Aug 2025 09:19:46 +0530
X-Gm-Features: Ac12FXwycrwqr1gQswj1ccTHY8V9dmU7ScsJGr3p21jvYqooYg-uQTAcSz70wPo
Message-ID: <CAPSxiM9g_dtxwavPUgyUHjn1qw9yc02=95NyWLyzAudCER80wg@mail.gmail.com>
Subject: Re: [PATCH v4 1/2] t/t1517: automate `git subcmd -h` tests outside a repository
To: Junio C Hamano <gitster@pobox.com>
Cc: Phillip Wood <phillip.wood123@gmail.com>, "D. Ben Knoble" <ben.knoble@gmail.com>, 
	phillip.wood@dunelm.org.uk, git@vger.kernel.org, chriscool@tuxfamily.org, 
	christian.couder@gmail.com, me@ttaylorr.com, ps@pks.im
Content-Type: text/plain; charset="UTF-8"

Thanks all for this.

