[darcs-users] repository state identifier(s) in "darcs show repo"

Guillaume Hoffmann guillaumh at gmail.com
Wed Dec 16 14:59:34 UTC 2015


2015-12-15 17:18 GMT-03:00 Ganesh Sittampalam <ganesh at earth.li>:
> I think showing the XORed hashes is a good idea. We've previously held
> back because of not being able to do the reverse mapping easily, but
> something is better than nothing.

I looked but haven't found previous discussion about this.

> There's some discussion of using XOR on this StackOverflow post:
>
> http://stackoverflow.com/questions/5889238/why-is-xor-the-default-way-to-combine-hashes
>
> The two main criticisms of XOR there are that it doesn't preserve
> ordering (which for us is a feature), and that XORing two identical
> things gives a 0. I don't think we'll have two identical patch hashes in
> the same repo, so that also seems fine.

Agreed.

> One thing to make very clear: these hashes will *not* be secure - as you
> can fake any patch with the right metadata but wrong content.

Yes. We can cite http://robotics.stanford.edu/~xb/crypto06b/index.html .

> I'm not too keen on showing the pristine hash. I guess a good point of
> comparison here would be git: does it ever expose just a tree hash (as
> opposed to the full commit id)?

Indeed, it seems really to be an internal hash, so far.

Maybe for a buildbot system it can be useful to expose it since two
identical pristine hashes are really two equal working copies.

Guillaume


More information about the darcs-users mailing list