On 2/27/17, Andy Bradford <amb-fos...@bradfords.org> wrote:
> Thus said Richard Hipp on Mon, 27 Feb 2017 21:50:43 -0500:
>
>> (9) There are no changes to  the file formats, other than relaxing the
>> size constraint on artifact hashes -  allowing hash to be greater than
>> or equal  to 40 characters rather  than requiring it to  be exactly 40
>> characters.
>
> The F-card in a manifest is currently defined as:
>
>  F filename ?SHA1-hash? ?permissions? ?old-name?
>
> So  the SHA1-hash  will be  a  variable-length hash  >= 40.  How will  a
> program (including  Fossil) that  interprets the  F-card know  what hash
> algorithm was used? Or  will it not matter? Will it  simply have to know
> that Fossil uses X, Y and Z  algorithms and to compute one of each until
> a match is found (perhaps using length as an indicator)?

The length of the hash will help reduce the number of algorithms it
has to try, perhaps to 1.  But in the event that two or more
algorithms with the same hash length are in play (ex: SHA2-256 and
SHA3-256) it tries them one by one until it finds the match.

>
> Also, when choosing a P-card to include in a manifest, how will a choice
> be made for hash to be included in the P-card? Likewise for the Q-card?

It uses the display name of the referenced artifact - whatever hash is
found in the BLOB.UUID column.

>
>> (11) URLs and  command-line arguments can use either  the display name
>> or any of the aliases for an artifact.
>
> I assume that the same Ambiguous Artifact page that is used when a short
> UUID is  used will  also be  used when the  aliases have  similar length
> collisions? e.g.  the SHA1  hash 0005  might have a  collision with  a 4
> character prefix of a different SHA3-256 hash?

Correct.  The query that does this was formerly "SELECT rid FROM blob
WHERE uuid GLOB '%q*'" with the %q being filled in by the prefix.
This will need to change to add "... UNION ALL SELECT rid FROM alias
WHERE hval GLOB '%q*'".  I think that after that one change,
everything should continue to work as before.

>
> Regarding:
>
>> (12) Web pages  that show details about an artifact  will be titled by
>> the display name, but will also show all aliases.
>
> What about command  line tools? This may seem off-the-wall,  but I often
> use a tty that is a standard 24 rows 80 columns:

This is a good question and one that I do not have an answer for yet.
My plan was to get the basic logic working first, and then afterwards
get community help in tweaking the output format.

-- 
D. Richard Hipp
d...@sqlite.org
_______________________________________________
fossil-dev mailing list
fossil-dev@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/fossil-dev

Reply via email to