Fossil User Forum

Feature suggestion - SHA1 or SHA3 ID indication next to Fossil IDs
Login

Feature suggestion - SHA1 or SHA3 ID indication next to Fossil IDs

Feature suggestion - SHA1 or SHA3 ID indication next to Fossil IDs

(1) By anonymous on 2022-08-04 14:53:25 [link] [source]

I am using the linux command line tools to match external files to those in a fossil repository.

For Fossil sha1 IDs the Fossil ID,

For example for file /setup/fossil.nsi the Fossil ID is 806b01761d5d42543d1c90b95b927c0ea8b251bf, part of checkin 4db19dccd3

I download the file, and running fossil sha1sum ./fossil.nsi on the Linux command line, I get 806b01761d5d42543d1c90b95b927c0ea8b251bf ./fossil.nsi

Running sha1sum ./fossil.nsi on the Linux command line, I get 806b01761d5d42543d1c90b95b927c0ea8b251bf ./fossil.nsi

So everything matches and I know they are the same file, so the Fossil ID here is a sha1 hash.

For file /README.md part of checkin ced33d1a the fossil ID is 597251593cf09dbd57f456d4cc3b74de75cd758f5ebff9654a99e3678b6dccbc

Downloading the file and running fossil sha3sum ./README.md I get 597251593cf09dbd57f456d4cc3b74de75cd758f5ebff9654a99e3678b6dccbc ./README.md

sha3sum -a 256 ./README.md 597251593cf09dbd57f456d4cc3b74de75cd758f5ebff9654a99e3678b6dccbc ./README.md

The ability to match external file checksums with the Fossil ID is very useful, but you have to distinguish between the Fossil sha1 and sha3 checksums. The length of the hash will tell you, but in the short form the length is hidden. It would be useful to indicate in the Fossil browser file view whether the Fossil ID is sha1 or sha3. eg. by colour or sha1 or sha3 after the ID.

(2) By Richard Hipp (drh) on 2022-08-04 15:09:35 in reply to 1 [source]

It would be useful to indicate in the Fossil browser file view whether the Fossil ID is sha1 or sha3.

I disagree. I think that is just extra information that clutters the display without adding significant new value. I do not want to add this. For the rare case where it is necessary to know the hash algorithm used, you can easily try them both to figure out which works, as you have demonstrated.

If you think showing the hash algorithm as part of the hash prefix display is important, you are going to present to make a much, much stronger argument.