From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from fout-b5-smtp.messagingengine.com (fout-b5-smtp.messagingengine.com [202.12.124.148]) (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 9038316A395 for ; Sat, 30 May 2026 23:47:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=202.12.124.148 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1780184832; cv=none; b=NDRBi4Mfrwv2cFmgxKR1wHPTYDWruRU5AcbzTLoYlh7w21K8fT7jRudTOrSX7KbyUfWzns24fw9REvvSyUUQBSPn9Xr7MXDRev8BJYWHGIJbPwvogoT+U/9/4/HZVEMjYWxvdEa08FoxvMhPPIxpCWRv9/UrlbnFPr1GbYu5C0U= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1780184832; c=relaxed/simple; bh=YlHfFJJ/9KBt0RGMJIGStXkBB9Acfu8NKcTSrbwbeyE=; h=From:To:Cc:Subject:In-Reply-To:References:Date:Message-ID: MIME-Version:Content-Type; b=Aq9eYvAOPep6zzzZJMXwFyfPKZhu6n+3tYd4vXwR9SL2jOh4kwfdw4dubTj/KUXozeJnzDK0rZDriUaWuTaKR2kL38tXuU0GLLfKvJIg8V+2QJtLVsQ4nkichtxU5f16OahjTcsNSoDOTkdNcWEFLVPQ2Us9hNsDvVHaWZF6gCs= 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=j2paOr/Y; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b=SQf0dH/t; arc=none smtp.client-ip=202.12.124.148 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="j2paOr/Y"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="SQf0dH/t" Received: from phl-compute-01.internal (phl-compute-01.internal [10.202.2.41]) by mailfout.stl.internal (Postfix) with ESMTP id 4E9B31D00031; Sat, 30 May 2026 19:47:09 -0400 (EDT) Received: from phl-frontend-01 ([10.202.2.160]) by phl-compute-01.internal (MEProxy); Sat, 30 May 2026 19:47:09 -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=1780184829; x=1780271229; bh=klINtNg1Sl wwEckkD9SdTHaUgcZcT3GORtp0Nje+3B4=; b=j2paOr/YERD7DS+aCiX6+sItU3 tywuD6STN7awLziLFbIndstft78SIgaGxIomro3DLQA86F+K4L+Ay/z+70OVZDNi iBraIkXlZDX4jhDnXWeWIKMFvYlJEwfFQv3MhzK5kILOtdruEmEg5PvccTdwwCg4 EO/bANNxmVIjegjVF8XTCeII74zTHNo9+KoUtJWo7gd/nnRLBgt4GjjX7/gxXCFN DoA3wfK1zsCv+5Mo+SYhim0KsJozMiEvRxXbunygWscg9x3vR8a+sQqF0V4TQgzU +d7u43m4sKJfrjeBT041JJ4gc1UBltmicQ6Wnh/a88stPWXtOCXtZw4a7miw== 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= 1780184829; x=1780271229; bh=klINtNg1SlwwEckkD9SdTHaUgcZcT3GORtp 0Nje+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A X-ME-Proxy: Feedback-ID: if26b431b:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sat, 30 May 2026 19:47:08 -0400 (EDT) From: Junio C Hamano To: Jacob Keller Cc: , Jacob Keller , Tuomas Ahola Subject: Re: [PATCH] describe: fix --exclude, --match with --contains and --all In-Reply-To: <20260528232950.187002-2-jacob.e.keller@intel.com> (Jacob Keller's message of "Thu, 28 May 2026 16:29:51 -0700") References: <20260528232950.187002-2-jacob.e.keller@intel.com> Date: Sun, 31 May 2026 08:47:07 +0900 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Precedence: bulk X-Mailing-List: git@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain Jacob Keller writes: > From: Jacob Keller > > git describe --contains acts as a wrapper around git name-rev. When > operating with --contains and --all, the --match and --exclude patterns > are not properly forwarded to name-rev as --exclude and --refs options. > > This results in the command silently discarding match and exclude > requests from the user when operating in --all mode. > > We could check and die() if the user provides --contains, --all, and > --match/--exclude. However, its also straight forward to just pass the > filters down to git name-rev. > > Notice that the documentation for --match and --exclude mention the > --all mode. It explains that they operate on refs with the prefix > refs/tags, and additionally refs/heads and refs/remotes when using > --all. > > Fix the describe logic to pass the patterns down with the appropriate > prefixes when --all is provided. This fixes the support to match the > documented behavior. > > Add tests to check that this works as expected. > > Reported-by: Tuomas Ahola > Signed-off-by: Jacob Keller > --- > > I was looking into reviving the patch that just added a simple die() and > realized that its actually pretty straight forward to just fix the support > instead. I'm open to either route, if we think this support isn't > necessary... I'm not sure if there are any gotchas or other issues with how > I implemented this. It is curious that this fails in some but not all CI jobs, and even more curious that these failures look the same. e.g., https://github.com/git/git/actions/runs/26671595367/job/78615760984#step:4:1984 +++ diff -u expect actual --- expect 2026-05-30 02:21:23 +++ actual 2026-05-30 02:21:23 @@ -1 +1 @@ -branch_A +remotes/origin/remote_branch_A error: last command exited with $?=1 not ok 70 - describe --contains --all --exclude # # echo "branch_A" >expect && # tagged_commit=$(git rev-parse "refs/tags/A^0") && # git describe --contains --all --exclude="A" --exclude="c" --exclude="test*" $tagged_commit >actual && # test_cmp expect actual Rings any bell?