[darcs-devel] SHA1-hashed files anywhere?

Guillaume Hoffmann guillaumh at gmail.com
Wed Mar 28 16:13:57 UTC 2018


This is basically what I said today on IRC:


I recently discovered that before the 2.0 release, hashed repositories
had their internal files hashed with SHA1 instead of SHA256 .

This is why in Darcs.Repository.Cache, the functions checkHash and
okayHash have a case where the hash is 40 characters long (the length
of a SHA1 hash).

I am tempted to remove this possibility, for wtf-per-line reduction sake

As a reference, here are the relevant  patches that happened some time
before the release of Darcs 2:

patch 655014b7141f3633415c9f7bdc6b79d5eaf40026
Author: David Roundy <droundy at darcs.net>
Date:   Fri Feb 29 14:18:11 -02 2008
  * enable reading of repositories with sha2 hashes.

patch 6cd3d764763baa2e7ce914dc0d13a7e094836235
Author: David Roundy <droundy at darcs.net>
Date:   Fri Mar 21 18:35:18 -03 2008
  * write sha256 hashes.
  Since this means we no longer take sha1 hashes of large data, I've removed
  some of the sha1-related config options.


More information about the darcs-devel mailing list