Multiple versions of patch, with same hash

Brian Norris computersforpeace at
Wed May 21 13:10:18 EST 2014


It looks like patchwork hashes are based purely on the contents of the
diff, without accounting for any metadata like email subject (including
version markers, like "PATCH v2") -- which is completely understandable.
But this means that the hash is not unique.

This becomes an issue for me when someone sends multiple versions of the
same series, with changes to some (but not all) of the individual
patches. So for instance, when there is a "PATCH 1/3" and a "PATCH v2
1/3" that are identical, the provided automatic patchwork tools (e.g,
pwclient) will refer me to the older patch ("PATCH 1/3") rather than the
new, if I'm doing lookup by hash (as the git post-receive hook does, for

If the tools are going to make any preference for one or the other, it
seems like maybe the newer one would make more sense. At least in my
example, I would associate the "Accepted" patch with the latest version,
not the first version that matches the same diff.

Does this make sense? Is this a known problem? I could try to patch the
tools so the collision falls toward the later, if that's desirable to
others. Or maybe this suggests we need a different approach to patch


More information about the Patchwork mailing list