Different hashes for the same patch

Carl-Daniel Hailfinger c-d.hailfinger.devel.2006 at gmx.net
Thu Dec 24 08:37:31 EST 2009


Hi,

it seems patchwork hashing depends on file order and that is causing
major headaches for me.
subversion and git spit out patches with different file order (but
otherwise identical contents) and my commit hooks calculate the hash
from the svn commit, but any hash-based comparison to the original git
patch fails.

# interdiff 1 2
# cat example.diff | python parser.py --hash
0a210e4e7771a2aaef3a16fbdb66f40c077c0eba
# cat example_reordered.diff | python parser.py --hash
1310aab3d17d56a5c8735962097beaffe4047c87
Any ideas how to solve this?

I had the idea to run an identity comparison against all stored patches,
but that quickly becomes computationally infeasible as the patch base grows.

Regards,
Carl-Daniel

-- 
Developer quote of the year:
"We are juggling too many chainsaws and flaming arrows and tigers."

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: example.diff
URL: <http://lists.ozlabs.org/pipermail/patchwork/attachments/20091223/4b822728/attachment.asc>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: example_reordered.diff
URL: <http://lists.ozlabs.org/pipermail/patchwork/attachments/20091223/4b822728/attachment.txt>


More information about the Patchwork mailing list