monotone-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Monotone-devel] Re: RFC: Fake IDs


From: Zack Weinberg
Subject: Re: [Monotone-devel] Re: RFC: Fake IDs
Date: Tue, 18 Jul 2006 17:38:42 -0700

On 7/18/06, Graydon Hoare <address@hidden> wrote:
Zack Weinberg wrote:
> ...
> vocab.hh provide a fake_id() function/macro that hashes __FILE__ and
> __LINE__.

Eh.. I'd prefer to turn those cases where we pick fake IDs to actually
loop, checking the db for a collision. It feels weird to be hard-coding
collision conditions into the binary, however unlikely.

I feel a little weird about it myself.  I considered nonce strings
that could not possibly be a valid SHA160, but that's asking for other
problems.  It seems somewhat better to have strings that are SHA160 of
_something_ than numbers that were just made up, though.

Your suggestion is interesting, however I don't always have the
database at the points where these are required.  Also, it doesn't
look like there's one table to look at to determine whether a hash is
already in use...?

zw




reply via email to

[Prev in Thread] Current Thread [Next in Thread]