-
-
Notifications
You must be signed in to change notification settings - Fork 23.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Has Linus Torvalds made literally 175 million commits? #564
Comments
haha nice observation, lol. plot twist: linus is actually 333years old |
Okay so turns out, github returns this number from their server: and parsing it with a proper kFormatter results in "165M" function nFormatter(num, digits) {
var si = [
{ value: 1, symbol: "" },
{ value: 1E3, symbol: "k" },
{ value: 1E6, symbol: "M" },
{ value: 1E9, symbol: "G" },
{ value: 1E12, symbol: "T" },
{ value: 1E15, symbol: "P" },
{ value: 1E18, symbol: "E" }
];
var rx = /\.0+$|(\.[0-9]*[1-9])0+$/;
var i;
for (i = si.length - 1; i > 0; i--) {
if (num >= si[i].value) {
break;
}
}
return (num / si[i].value).toFixed(digits).replace(rx, "$1") + si[i].symbol;
}
nFormatter(164882902) // "165M" |
Damn then linus is actually 333years old |
Hmm that's weird... unless they have some bot that auto-commits to some secret repos that don't show up in the published contribution count. Even so those "secret" commits have made up 99.99% of the total 🤔 |
bad! nothing correct https://github-readme-stats.vercel.app/api?username=iamabs2001 |
The API counts commit in approximately this way: counts all commits from someone in all non-forked repositories, despite some of them having the same commit hashes. So the answer is clear, there are tons of non-forked Linux kernel source trees on GitHub, so each commit from Linus in each non-forked Linux kernel source tree participates in counting... |
Randomly pick some Linux kernel contributors and you will find that their commits have also been counted so many times. https://api.github.com/search/commits?q=author:tiwai |
That tells a lot. Btw how did you know the way it counts? |
Let us take a look at https://api.github.com/search/commits?q=author:torvalds and you will find the answer :) |
Or you may directly check https://github.com/search?q=author:torvalds to get the same conclusion as mine. |
context: #564 (comment) Even I and @anuraghazra are affected:
If you want to check if you are affected, my deployment is https://github-readme-stats-rongronggg9.vercel.app/api |
Describe the bug
@torvalds joined GitHub on September 3, 2011, and makes 2000+ contributions every year (as seen on his profile) that sums up to about 22k. However, your badge shows that he has a total of 175308.6k commits, which is far from reality. Even the number itself is absurd- one who commits once every minute would need 333 years to achieve this number!
Expected behavior
"Total commits" shows a number that is comparable to the number of contributions given by Github.
Screenshots / Live demo link (paste the github-readme-stats link as markdown image)
Additional context
None
The text was updated successfully, but these errors were encountered: