Conversation
|
I completely agree with this PR. I do not understand the reason for using only the first 8 characters. For reference, the code was introduced nearly 10 years ago and never changed fb8fece For reference, I understand the desire to have a stable output (i.e. a fixed length), but then I also don't quite understand why the conditional may ever hit the case |
|
Please let me note that git increased at some point from using 6 characters to 7 (in git describe), and with more sophisticated attacks on SHA1, I don't see any value in truncating the output. |
Before, the revision was at most the first 8 bytes in the revision. This can be problematic for reproducibility since the revision may then be ambiguous.
bf6b2ad to
0d94c43
Compare
|
Agree on the idea, it needs some testing for mercurial part |
|
I agree, too - it obviously makes sense to display the shortest unique prefix for a clearer display to a user, but certainly not to be using that internally. |
|
I'm wondering what the status of this PR is and what can be done to get it merged? Since three opam developers are supporting this PR, I propose to merge it rather sooner than being delayed for unclear reasons ("it needs some testing for mercurial part" -- so who's using mercurial and opam these days? If this is a showstopper, maybe revert the changes to opamHg.ml?) |
|
I've just tested locally using mercurial and it works fine (the default hash size for mercurial is 12) Thanks a lot! |
git, hg: Use full revision
git, hg: Use full revision
Before, the revision was at most the first 8 bytes in the revision. This can be problematic for reproducibility since the revision may then be ambiguous. I don't know much about mercurial and how their revisions look like.
CC @hannesm