Hello! Timothy Sample <samp...@ngyro.com> skribis:
> If you want a concrete example to think through, there’s ‘eclib’. Our > package says it’s version “20190909”, but that’s not what upstream calls > version “20190909”. It looks like when we packaged ‘eclib’, that tag > pointed to commit 19e7e3e74268bf78bd9a1c4ba07597d5434fb166, but now it > points to bfbbd7c414521e1bf5e718a2925ea8ad845a2e87. [...] > First, as expected, finding the original commit was painful. SWH did > not record the old version of the tag. It probably did: SWH archives the “history of histories”. However, our SWH code, ‘lookup-origin-revision’, is looking at the tag found in the latest snapshot, which is not helpful in this case. [...] > Second, these cases are very, very rare. (I’ve essentially checked > every Git origin since Guix version 1.0.0, and this problem is not one > that worries me). “Tricking Peer Review”-style problems seem to be much > more prevalent. When tracking down a “difficult” Git origin, the first > thing I do is grep the Guix Git history for a “oops I committed the > wrong hash” message. I recommend we focus our energies there before > worrying too much about replacing tags with commits or using both or > whatever. Agreed, it’d be nice to address, but not concern #1. > And as a bonus, if you want to be really kind to future time travellers, > when fixing an errant hash, please include a nice hint as to what the > original hash was for (like a commit hash). We have commit > ca5a791f6285b08506ccd662d5911ccf0c4d1ece in our repo, which says: > >> The previous hash was from the "dev" branch of the repository. > > I can’t find the source for the previous hash, and if I could actually > travel through time, I would change the commit message to: > >> The previous hash was from commit abcd0123..., which comes from the >> "dev" branch of the repository. In commit 944bd79113b9c856b11dd2b40d40e0274a9f4dd9 I added an explanation right in the source; I think that’s a transparent and clear way of handling issues with tags modified in place. Ludo’.