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 F06E2349B0D for ; Sat, 20 Jun 2026 15:15:07 +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=1781968509; cv=none; b=bVOCoyJv6NdHLWmBWO8+60zZdwBFu5fghKq3fTmIvl29i6bICX0yhLUpYnCS3Q4DfuLv6EraxsprHYM7VOwRNiRiXR2h8c8Ni35Cn5HWVFKMFe6ZsNAmsvpOFPK0YSHPxNx2fy0TJc2AM2GyU1Opz4y1DVT0YDIthX+GUFAs/hw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1781968509; c=relaxed/simple; bh=NpqXCfHEbOUojad7O6BRQrKyi4/abxjhJvPzUeRhrK8=; h=From:To:Cc:Subject:In-Reply-To:References:Date:Message-ID: MIME-Version:Content-Type; b=sINnbgCv3BhQaFpar4XKKTvfFhe5MqK/ddVbPfDXQTzvUjrFHXL5cgjaBW8PrqWc3Bmg07W7CDIULZpBhkUnYpojsD3HxjsDUMuDN98R/yfzl1fbIfeHxKOj5emN5UPHLwc3nZNbeb0dvoV4K9jWEipBsVYLzSmOf2ib4+PmfjE= 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=UzIg1Vxe; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b=cVIcT8BD; 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="UzIg1Vxe"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="cVIcT8BD" Received: from phl-compute-05.internal (phl-compute-05.internal [10.202.2.45]) by mailfout.phl.internal (Postfix) with ESMTP id 26622EC0263; Sat, 20 Jun 2026 11:15:07 -0400 (EDT) Received: from phl-frontend-01 ([10.202.2.160]) by phl-compute-05.internal (MEProxy); Sat, 20 Jun 2026 11:15: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=1781968507; x=1782054907; bh=q3L1XTEbo+ IQHm2OGTlLVkU1nU4KOxCSizkufasZLLo=; b=UzIg1VxeywIK+tO3XHFuOc2USK rqVIu+2e2JPYHqkpwv6wGmFKfd5Pv1Gxq16+cbgqxDEX4xz8LSPr/oKGFr3TR4ZT yrv3a/ab0CHIAihyVN98/rvNYKvuyjmNfWLeCMfOeUn+iUQ+8DbBye0q54jV/HI8 cQDZWMcLCpXXjfgMplRSby5+0SgiQ6Cjl5mzcHepDUXd1cv32/3upHyrVR+T60HP su0qa8yBlWRogyQMQaBSBaePfK9R1+09OUUuzMkl6O5RyYfNe15r69iHuZ1YHKVY xj+ONtJ4JQg0D1uUB/4zdakFqaxkAslZjgMpgLlpCUqzLyIgDuN4ibx7nreQ== 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= 1781968507; x=1782054907; bh=q3L1XTEbo+IQH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hvYSLMFQVjuK3g X-ME-Proxy: Feedback-ID: if26b431b:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sat, 20 Jun 2026 11:15:05 -0400 (EDT) From: Junio C Hamano To: Pablo Sabater Cc: git@vger.kernel.org, SZEDER =?utf-8?Q?G=C3=A1bor?= , Michael Montalbo , krka@spotify.com, ayu.chandekar@gmail.com, chandrapratap3519@gmail.com, christian.couder@gmail.com, jltobler@gmail.com, karthik.188@gmail.com, peff@peff.net, phillip.wood@dunelm.org.uk, siddharthasthana31@gmail.com, Kristofer Karlsson Subject: Re: [PATCH v6 2/3] revision: add peek functions for lookahead In-Reply-To: (Junio C. Hamano's message of "Sat, 20 Jun 2026 07:56:42 -0700") References: <20260613-ps-pre-commit-indent-v5-0-8d308efea63d@gmail.com> <20260620-ps-pre-commit-indent-v6-0-cdc6d8fd5fbc@gmail.com> <20260620-ps-pre-commit-indent-v6-2-cdc6d8fd5fbc@gmail.com> Date: Sat, 20 Jun 2026 08:15:03 -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 Junio C Hamano writes: > I _think_ this is OK, as "--graph" sets .rewrite_parents bit (as > well as .topo_order bit) on, which makes want_ancestry() to return > true. Which in turn means even if -L is in effect, we will not call > line_log_process_ranges_arbitrary_commit() that is the only source > of side effect in this function. Somebody needs to sanity check > this, but we may want to leave an in-code comment to warn future > developers not to call get_commit_action() on random commits outside > of the normal history traversal under what condition (namely, -L > without rewrite_parents). > > Even better, perhaps add > > if (revs->line_level_traverse && !want_ancestry(revs)) > BUG("do not call this"); > > at the beginning of revision_has_commits_after() function, and > describe why in the header file comment for this function below? Having said all that, in the longer term we might be better off if we fix the line-log code so that get_commit_action() becomes a pure function again. It might be a very simple change to move the "if we are doing -L and !want_ancestry(), call the line_log_process_ranges_arbitrary_commit()" to simplify_commit() before it calls get_commit_action(), but I haven't thought things through. [jc: Michael Cc'ed as there are a few topics on line-log recently from him; SZEDER Cc'ed as his 3cb9d2b6 (line-log: more responsive, incremental 'git log -L', 2020-05-11) introduced this side effect there.] In any case, this is a remote tangent that does not affect how we want to proceed with this series ;-).