From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from fhigh-b3-smtp.messagingengine.com (fhigh-b3-smtp.messagingengine.com [202.12.124.154]) (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 8EEB02D0C94 for ; Mon, 29 Jun 2026 17:50:07 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=202.12.124.154 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1782755408; cv=none; b=iZKzTFrw9UWiXWVYo/rI1X/rW0ppVLyWYUip8yXETXdKXAO7fl9QFKvPGook66OaY2O/dER4Nj0bXDijZz+rJNshmgFqgv/X4W8grtgeNWyBMHMQUU/ERSYE0/hBN4rOIz+TPOclZQU1JqLNZBmaWsIdc75kPvnlM3X8llBqBzg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1782755408; c=relaxed/simple; bh=qF6GOs9nwabn/G/gqaO2nUEFfpggCf5BG9k0yh7gI/Q=; h=From:To:Cc:Subject:In-Reply-To:References:Date:Message-ID: MIME-Version:Content-Type; b=dwkp0kHOL8iaEwY8FS6HBrVGvykBpn0LsAkQjlfNRL1JG6Nu3x2bLQDcZzi1WDLmSdpdrAPDazuabvBAFbYQJB7Ti26xj91iS3Un4v6n7Ro3b6dDfdSj62X5UDsloBy53EOuk7HegkFRsS5LGKUTHLtZk2jL3U/3LHXtERHJfPQ= 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=gSfcxtOZ; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b=IECuKIg7; arc=none smtp.client-ip=202.12.124.154 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="gSfcxtOZ"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="IECuKIg7" Received: from phl-compute-05.internal (phl-compute-05.internal [10.202.2.45]) by mailfhigh.stl.internal (Postfix) with ESMTP id CD4C27A0075; Mon, 29 Jun 2026 13:50:06 -0400 (EDT) Received: from phl-frontend-02 ([10.202.2.161]) by phl-compute-05.internal (MEProxy); Mon, 29 Jun 2026 13:50:07 -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=1782755406; x=1782841806; bh=Y2DiKVeebL 49aLwr6BvwQFOQOc13j01WwGwFdma4Z7g=; b=gSfcxtOZLQEHOsT66WanidnjZv RPeyHUQhKHvfZ3mEkcaaFSG99VNv9GMu2bGNmAgnvo//Ethvs/F6vcUjpYoVrq1g Nq+ECUg3IKp3DPCkK/psQcqL/Jmru4J3tRXEgQNF4iNv4kz8h5g9q91X748vd+vO SYwkA8QSS9VXe1NfslMX/SQzwUfVg57x5thDdUKWRDHVKKtIWJ3YVFW8TNN75Unw INizZCX0ENekKfKp87jJ01SOab7WSt7P2/YY0Bd1C+SLVITULiLaz3z5SKlvQKOC Tfz2NZ9j7O1b69LKA2hDaNYTLFJ9UpZwUKI1kRwPgWqXsyvkrdUlJUW6gqvQ== 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= 1782755406; x=1782841806; bh=Y2DiKVeebL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VJmKa7ChkxkC36Q X-ME-Proxy: Feedback-ID: if26b431b:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 29 Jun 2026 13:50:05 -0400 (EDT) From: Junio C Hamano To: "Kristofer Karlsson via GitGitGadget" Cc: git@vger.kernel.org, Derrick Stolee , Kristofer Karlsson Subject: Re: [PATCH 0/2] commit-reach: fix !FIND_ALL early exit with v1 commit graph In-Reply-To: (Kristofer Karlsson via GitGitGadget's message of "Mon, 29 Jun 2026 13:19:19 +0000") References: Date: Mon, 29 Jun 2026 10:50:01 -0700 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 "Kristofer Karlsson via GitGitGadget" writes: > Fixes a bug introduced by 93e5b1680e (commit-reach: early exit > paint_down_to_common for single merge-base, 2025-04-10) where git merge-base > can return the wrong result. > > The bug requires all of the following to trigger: > > 1. A v1 commit graph (topological levels only, no corrected commit dates). > Generation v2 with corrected commit dates has been the default since > 2021, so only repos that have not rewritten their commit graph in over > four years would be affected. > 2. git merge-base without --all (the common case, but --all is unaffected > because it disables the early exit). > 3. A topology with clock skew: the correct merge base has a lower committer > date than one of its ancestors that is also a common ancestor. With date > ordering, the deeper ancestor pops first and the early exit fires before > the correct result is found. > > This two-patch series: > > 1. Adds a test demonstrating the bug (clock-skew topology where the correct > merge base has a lower date than its ancestor) > 2. Fixes it by tracking whether the queue is generation-ordered and gating > the early exit on that flag Where should this new "gen_ordered" flag go in the world with kk/merge-base-exhaustion topic merged in? Does it also belong to the paint_state struct or can it be on-stack independent variable to the function?