|
|
Subscribe / Log in / New account

Issue IDs

Issue IDs

Posted Jan 17, 2025 18:49 UTC (Fri) by mathstuf (subscriber, #69389)
In reply to: Issue IDs by ewen
Parent article: The many names of commit 55039832f98c

> Here even a (sha256) hash of just the patch diff (not the tree) would be a better choice than an arbitrary merkle tree hash. If the kernel won’t follow modern industry best practice.

Hmm. I'm not so sure that would work either. There are different diff algorithms in git itself and one might have higher context settings for various reason (e.g., I believe Phabricator wanted "infinite" context for uploaded patches).


to post comments

Issue IDs

Posted Jan 17, 2025 20:47 UTC (Fri) by ewen (subscriber, #4772) [Link]

If one were generating a diff for the purpose of computing a stable “change ID hash” then obviously the exact diff algorithm, formatting, and diff parameters would need to be fixed, along with the hash algorithm. To ensure it was reproducible over time and different runtime environments.

TomH pointed out elsewhere in the thread that there is an internal “git patch-id” already, in git, that might form the basis of a “hash of just the patch diff”, if the “stable” kernel could be persuaded to accept that as the ID. It’d probably require extra tooling / metadata support to store enough information to enable efficient lookup of commits by the stable “change ID hash” (eg each git tree, or user, storing a cache of “change ID hash” to “merkle tree hash” mapping for direct lookup).

Ewen


Copyright © 2025, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds