Re: [PATCH v2] checkkconfigsymbols: resolve revisions before resetting the tree

From: Julian Braha

Date: Tue Sep 15 2026 - 08:15:46 EST


On 9/7/26 11:37, Erkan Erdem wrote:
> The commit comparison resets the current branch to commit_a before
> resolving commit_b. If the second revision is HEAD or the current branch
> name, it then resolves to the first revision. For example, --diff
> HEAD^..HEAD compares the parent with itself and silently misses newly
> undefined symbols. The same problem affects --commit with the current
> branch name.
>
> Resolve and verify both revisions as commits before the first reset.
> This keeps their meaning stable throughout the comparison and rejects
> invalid endpoints before changing the working tree.
>
> Keep lookup diagnostics separate from the resolved hashes. Use the
> resolved range for --find too, since resetting also updates ORIG_HEAD.
>
> Fixes: b1a3f243485f ("checkkconfigsymbols.py: make it Git aware")

While it's good to support this, I don't think the Fixes tag is
appropriate here, because this wasn't really a bug... it was just
unsupported functionality.

> Link: https://lore.kernel.org/20210901145212.478066-1-arielmarcovitch@xxxxxxxxx/

This commit added a check that will cause the script to exit if
'HEAD...' is passed to --commit. So it seems like this patch should also
remove those lines now.

Note that doing so would also effectively revert that commit, so in v3
it would be good to add:

'This reverts commit ...'

to your commit message.

- Julian Braha