git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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

From
Michael Montalbo <mmontalbo@gmail.com>
Date
Jul 25, 2026, 19:25 UTC
Message-ID
<CAC2QwmKP16cyw0get3hEWP8GjcFkUHB3uXxcQi9hBCCM-B+ECw@mail.gmail.com>
In-Reply-To
<xmqqjyqk3w7d.fsf@gitster.g>
On Fri, Jul 24, 2026 at 2:38 PM Junio C Hamano <gitster@pobox.com> 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/xmqqtsqxfdl4.fsf@gitster.g/.

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.

Previous: Junio C HamanoNext: Junio C Hamano
Message 3 of 5 in “revision: make get_commit_action() a pure predicate”
  1. revision: make get_commit_action() a pure predicateMichael Montalbo via GitGitGadget, Jul 15, 2026
  2. Junio C HamanoJul 24, 2026
  3. Michael MontalboJul 25, 2026
  4. Junio C HamanoJul 27, 2026
  5. Junio C HamanoJul 27, 2026

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.