Re:Four rules for effective collaboration – Guidelines for b...
by jwilk on Wednesday March 07, 2018 @08:22AM
(#16536134)
It's a bit baffling that git.git suggests using 7-characters commit abbreviations, when they already have collisions for them:
[ Parent
| on HN ]
Re:Four rules for effective collaboration – Guidelines for b...
by deiwin on Wednesday March 07, 2018 @09:47AM
(#16536697)
Where did you find the 7 character suggestion? 7 used to be the default suggestion, but the problem of collisions has been acknowledged and dealt with by the git project. Linus himself authored the change that made the abbreviated revision length vary based on the size of the repository: https://github.com/git/git/commit/e6c587c733b4634030b353f402.... Also, the command for creating references to other commits which comes from the git project and is linked to in the article also uses automatic abbreviation length.
Re:Four rules for effective collaboration – Guidelines for b...
by Cthulhu_ on Wednesday March 07, 2018 @09:41AM
(#16536647)
7 characters should be enough for most repos, and iirc git can deal with collisions already (so git co 1536dd9 in your example would bring a prompt).
How many commits is the repo you're running this on btw?
Re:Four rules for effective collaboration – Guidelines for b...
by pleasecalllater on Wednesday March 07, 2018 @12:31PM
(#16538017)
Sure. And randomly generated UUIDs should not conflict... unless they do, and blow up a huge app in production. Yes, I have experienced that once.
Re:Four rules for effective collaboration – Guidelines for b...
by msingle on Thursday March 08, 2018 @12:19AM
(#16542466)
the odds of truly randomly generated UUID's conflicting are .... really really low (see https://en.wikipedia.org/wiki/Universally_unique_identifier#...).
If you had a collision, then the odds are truly opposed to anyone else ever having that problem in the foreseeable future, so thanks for taking the hit for the rest of us!