From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from fhigh-a4-smtp.messagingengine.com (fhigh-a4-smtp.messagingengine.com [103.168.172.155]) (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 584FB31353C for ; Thu, 7 May 2026 19:35:56 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=103.168.172.155 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778182557; cv=none; b=bIL8aZeUQ9AoZxIdyYVsM/256lSfYuvkEiLKSFBfHiyWb1DjjTeZi7/gHkpjL45rBwt8WFkMd8CqCkv38PZuaPi0cTSsHzE4tUDkb3qqL9qW1nWNlcmZ1A1T1AUwddXi6he34huCb4cgYeUYo6f4rtwg+xPNbEmWaLsDQtbbdZI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778182557; c=relaxed/simple; bh=2gVEDcx7FzPvE2Ak1OyIADYTqSl7XD30t0NiskR5Sc4=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=l9fozm1S0QoUJdfJwVE98jDFa1ai1zX67flkUjkn3AiFanUz3jR0wELrHKq3HbsX7kLX5l9NV9aMOqP4byPHvDYtG8YXzReJeqG1e2oikEY1uXLHKgmD7XcJ0hVFPNk+jf7+FDUTOh86mW9xDBAyqo2JPKvmteaKHPQCkv+lnhc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=fastmail.com; spf=pass smtp.mailfrom=fastmail.com; dkim=pass (2048-bit key) header.d=fastmail.com header.i=@fastmail.com header.b=dBIWMftB; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b=LEaFu9vD; arc=none smtp.client-ip=103.168.172.155 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=fastmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=fastmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=fastmail.com header.i=@fastmail.com header.b="dBIWMftB"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="LEaFu9vD" Received: from phl-compute-03.internal (phl-compute-03.internal [10.202.2.43]) by mailfhigh.phl.internal (Postfix) with ESMTP id A53E3140002E; Thu, 7 May 2026 15:35:55 -0400 (EDT) Received: from phl-frontend-04 ([10.202.2.163]) by phl-compute-03.internal (MEProxy); Thu, 07 May 2026 15:35:55 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fastmail.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=fm3; t=1778182555; x=1778268955; bh=d9j6OUvygxvmWr/ltxSEHwuKG+yTtu/Wo+VC9O9Ccow=; b= dBIWMftBGhqa7X64kLnzrXUCbqaGpe9XM0HnWZdxuCGfzO9FrX0F/jhWJokt8NKl 2w/az3pFpxdXmTOEjpNcMuaTiprWR06QTdjMhYrk/d+cgHXTX+cagNZK/4Ki6yKM bQ9kWJu+2kE6l5gCCHX7fDX7WpNI4MSnyZ6gSIlmOOtYtzV4gmRjEUKZ7Frf4y2c jqmEaP68yoN3MYQhsriMVJPVX0hglad+e1p6elnogvkTAamLswEeV+F4nx4WAp3o wwLnwRek4MfNfhjEwVVJeaLNoui83sWgKtT9m1c/tDuNUr2+3RoqFOYvq43VAp0v Qe+eCc1/HJT6YIHj9Qu12w== 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=1778182555; x= 1778268955; bh=d9j6OUvygxvmWr/ltxSEHwuKG+yTtu/Wo+VC9O9Ccow=; b=L EaFu9vD29hNsi9NZcxsi0Ep7hqGJv0nfhwScUaMBYLCLCeJmbB7MuVfEQCKnBjK1 RcwVDdF9LrVaZLJx64l3QxCDdHz7smGP0omG7+A4DC8AxEEOY5QvZAbimuApUG2j tce925F3J/C9dMhGn8CAMoitfMmMIPJn9+Magak1+vUWiFdtBZsSuWMNKzHdiSBu xuugd7CUjHkWyTH4gYDEbpsPYXI08YphqEAo/zV1biFG5EIJsgzA+AAoISSHaO7/ EADsMqLr0YAQD9ZZ4YvAW+f8FeGMQmseFbjntcaxlkF5aizQf8fb5tfroXFGSve3 D4A3nvJsf1n2eFTILJmlw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefhedrtddtgddutdekfeefucetufdoteggodetrf dotffvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfurfetoffkrfgpnffqhgenuceu rghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnegfrh hlucfvnfffucdlfeehmdenucfjughrpefhvfevufffkffojghfgggtgfesthekredtredt jeenucfhrhhomhepkhhrihhsthhofhhfvghrhhgruhhgshgsrghkkhesfhgrshhtmhgrih hlrdgtohhmnecuggftrfgrthhtvghrnhephffggeelhfejkefgteelteejhfetieehgeef tdduudffgeejhfektedugefghfeknecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrg hmpehmrghilhhfrhhomhepkhhrihhsthhofhhfvghrhhgruhhgshgsrghkkhesfhgrshht mhgrihhlrdgtohhmpdhnsggprhgtphhtthhopeehpdhmohguvgepshhmthhpohhuthdprh gtphhtthhopehgihhtsehvghgvrhdrkhgvrhhnvghlrdhorhhgpdhrtghpthhtoheptgho uggvsehkhhgruhhgshgsrghkkhdrnhgrmhgvpdhrtghpthhtohepsggvnhdrkhhnohgslh gvsehgmhgrihhlrdgtohhmpdhrtghpthhtohepphhhihhllhhiphdrfihoohguseguuhhn vghlmhdrohhrghdruhhkpdhrtghpthhtoheprhgrmhhsrgihsehrrghmshgrhihjohhnvg hsrdhplhhushdrtghomh X-ME-Proxy: Feedback-ID: i8b11424c:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 7 May 2026 15:35:54 -0400 (EDT) From: kristofferhaugsbakk@fastmail.com To: git@vger.kernel.org Cc: Kristoffer Haugsbakk , ben.knoble@gmail.com, Phillip Wood , Ramsay Jones Subject: [PATCH v4 4/5] name-rev: make dedicated --annotate-stdin --name-only test Date: Thu, 7 May 2026 21:34:23 +0200 Message-ID: X-Mailer: git-send-email 2.54.0.13.g9c7419e39f8 In-Reply-To: References: Precedence: bulk X-Mailing-List: git@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit From: Kristoffer Haugsbakk The previous commit split the `--name-only` handling: 1. `--annotate-stdin`: uses the new `struct command` 2. The rest: uses `struct name_ref_data` But there is no dedicated test for the option combination in (1). That means that the following tests will fail if you neglect to set `command.u.name_only` properly: name-rev --annotate-stdin works with commitGraph name-rev --annotate-stdin works with non-monotonic timestamps even though it has nothing to do with what these tests are supposed to test. Let’s add another regression test now that it is relevant. Signed-off-by: Kristoffer Haugsbakk --- t/t6120-describe.sh | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/t/t6120-describe.sh b/t/t6120-describe.sh index 2c70cc561ad..62789f76381 100755 --- a/t/t6120-describe.sh +++ b/t/t6120-describe.sh @@ -298,6 +298,20 @@ test_expect_success 'name-rev --annotate-stdin' ' test_cmp expect actual ' +test_expect_success 'name-rev --annotate-stdin --name-only' ' + >expect.unsorted && + for rev in $(git rev-list --all) + do + name=$(git name-rev --name-only $rev) && + echo "$name" >>expect.unsorted || return 1 + done && + sort expect && + git name-rev --annotate-stdin --name-only \ + actual.unsorted && + sort actual && + test_cmp expect actual +' + test_expect_success 'name-rev --stdin deprecated' ' git rev-list --all >list && if ! test_have_prereq WITH_BREAKING_CHANGES -- 2.54.0.13.g9c7419e39f8