Re: repository state identifier(s) in "darcs show repo"

Guillaume Hoffmann <[email protected]>
Newsgroups gmane.comp.version-control.darcs.user
Message-ID <CADw8UJpRJqoNf57k0b1NxpnWakUtWRccZeRd_GzB7hH04Y4-bA@mail.gmail.com>
2015-12-15 17:18 GMT-03:00 Ganesh Sittampalam <[email protected]>:
> 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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.