|
|
Subscribe / Log in / New account

Automated tools should fail on ambiguity

Automated tools should fail on ambiguity

Posted Dec 18, 2024 14:40 UTC (Wed) by farnz (subscriber, #17727)
In reply to: Automated tools should fail on ambiguity by mathstuf
Parent article: Facing the Git commit-ID collision catastrophe

Note that a commit ID in git qualifies as a refspec, and that's what most APIs actually ask for - something that git can resolve to a commit. And the trouble kicks in when you accept a refspec - because main, refs/branches/main, aef25be35d23 and aef25be35d23ec768eed08bfcf7ca3cf9685bc28 are all valid refspecs in git, but the truncated hash can be ambiguous with other commits, and only the full hash is unambiguous over time (since the others are mutable).

And IME, if you don't run CI on every single commit, people do ask for CI for a specific commit by hash, rather than mutable ref - when something worked 10 commits ago, but fails now, asking CI to fill in the gaps is useful.


to post comments


Copyright © 2025, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds