TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Note the commit hash

86 点作者 Xlab大约 11 年前

6 条评论

avar大约 11 年前
Here&#x27;s a patch I submitted purely for discussion to add a feature to Git to allow for vanity commit hashes back in 2011, it generated some interesting discussion: <a href="http://lists-archives.com/git/756392-choosing-the-sha1-prefix-of-your-commits.html" rel="nofollow">http:&#x2F;&#x2F;lists-archives.com&#x2F;git&#x2F;756392-choosing-the-sha1-prefi...</a><p>Unlike the linked it didn&#x27;t alter the commit date, but altered the Git code itself to add a new custom header to the commit object.<p>Git handles custom headers just fine since it ignores unknown headers for future compatibility. This commit still lives in the main Git repo at work without any issues:<p><pre><code> commit 313375d995e6f8b7773c6ed1ee165e5a9e15690b tree c9bebc99c05dfe61cccf02ebdf442945c8ff8b3c parent 0dce2d45a79d26a593f0e12301cdfeb7eb23c17a author Ævar Arnfjörð Bjarmason &lt;avar@booking.com&gt; 1319042708 +0200 committer Ævar Arnfjörð Bjarmason &lt;avar@booking.com&gt; 1319042708 +0200 lulz 697889</code></pre>
评论 #7545881 未加载
poopicus大约 11 年前
If you&#x27;re wondering how he did it, Brad wrote a tool called &#x27;gitbrute&#x27;[1] that (as the name suggests) brute-forces the prefix of the hash to whatever you like.<p>[1]: <a href="https://github.com/bradfitz/gitbrute" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;bradfitz&#x2F;gitbrute</a>
评论 #7543594 未加载
评论 #7544119 未加载
rspeer大约 11 年前
It is almost certain that there are a quarter-billion published Git commits by now. (GitHub says there were 150 million pushes in 2013 alone, and many of those have multiple commits.)<p>This means it is likely that, purely by coincidence, someone has at some point had their commit labeled as (badc0de).
评论 #7543399 未加载
评论 #7544249 未加载
cdelsolar大约 11 年前
I thought the commit hashes had to do with the actual code being checked in. There&#x27;s a random component to them as well?
评论 #7543403 未加载
评论 #7543384 未加载
评论 #7543397 未加载
评论 #7543382 未加载
mschuster91大约 11 年前
Is this something like the Bitcoin vanity addresses? Partial sha1 collision?
评论 #7543355 未加载
评论 #7543314 未加载
chetanahuja大约 11 年前
And thus began, gitcoin.