Re: [PATCH] revision: make get_commit_action() a pure predicate

Michael Montalbo <[email protected]>
Newsgroups org.kernel.vger.git
Message-ID <CAC2QwmKP16cyw0get3hEWP8GjcFkUHB3uXxcQi9hBCCM-B+ECw@mail.gmail.com>
On Fri, Jul 24, 2026 at 2:38 PM Junio C Hamano <[email protected]> wrote:
>
> Sorry, but I completely lost track and I do not recall suggesting a
> change that amounts to 100+ lines of new lines.  Are we doing any
> code clean-up?  Bugfix?  A new feature?

A latent bug fix, but I understand why this was confusing.

This was the discussion I should have linked to:

https://lore.kernel.org/git/[email protected]/.

I had the link in my GGG PR description but accidentally deleted it
without re-adding when I remembered GGG PRs shouldn't use a
description for one commit series.

The linked discussion refers to a new graph feature that invokes
get_commit_action() under the assumption the function will not
modify any commit state. The graph feature in question uses a
configuration that just happens to avoid the branch of
get_commit_action() that modifies a commit's line range state,
so a bug isn't ultimately surfaced in the linked topic feature, but
it remains a potential issue for future callers.

Unfortunately, I couldn't figure out a way to make a test that
validates if the change is effective without creating a bespoke
test-tool that calls the function with the "right" options set.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.