Internals/Hashes
Things in Darcs that are or that resemble hashes:
Patch hash - patch name, author name, timestamp, log
- Used as a unique identifier for patches (because patch internals change during commutation)
- Every patch has one in all Darcs formats
- You can see this in the darcs changes –xml output (it may end in a ’.gz’ but that’s meaningless)
- This never changes, even if you commute the patch
File contents hash (sha256) - used for identifying/verifying hashed patch/pristine/inventory files
- See HashedPristine for details
- Note that this changes depending on what the context of the patch is
Patch bundle hash - used to verify that patch bundle was not corrupted (eg. by a mail client)
Patch salt - not actually a hash (for now). This is just the hexadecimal representation of some random number from 0 to 2^128. It’s random noise inserted into the log to help patch hashes stay unique. (see issue27). In the future one might replace this with an actual hash of the patch contents plus their context.
See also
- more specific details about NamedPatch
- HashedPristine
- CacheSystem
