Lessons from torvalds/GitHub commits discussion
technicallyborked.com
technicallyborked.com
https://github.com/torvalds/linux/pull/17#issuecomment-56637... https://github.com/torvalds/linux/pull/17#issuecomment-56637...
Is it that github doesn't enforce a commit message standard? Or is it that github doesn't allow you to follow a commit message standard such as what Linus uses?
Does git itself enforce a standard, for that matter?
What exactly is the deficiency in github?
If you work within GitHub's UI only (and rarely look at your shortlog / git log on the command line), you'll never know about this because the web UI hides this fact. That seems to be what Linus is getting at - that the tool (git itself) was built to be awesome on *nix platforms, and GitHub effectively ignores this aspect of git.
Finally, since the web UI doesn't enforce the proposed standard, you effectively create two groups of people: people who work through the web UI (or other UI-based tools), and people who work from the command line. Only the command-line people really suffer. However, if everyone (even people who work in the web UI) would conform to the standard, not only is everyone happy, but it encourages people who write commit messages to be more succinct, effective, and precise in their messages.
That's pretty much what I took from it.
However, I still fail to understand Linus' outright refusal to even accept submissions made via a web interface rather than simply say "when you do a pull request, it must follow this format".
In particular, "the quality of stuff I have seen from people who use the github web interfaces has been so low that it's not worth my time."
I didn't realize all the tools git has built-in (therefore developed with Linus's workflow in mind) for handling patches until I was poking around today:
git format-patch origin
This creates a git-style patch for every unpushed commit I have. git-style meaning it's actually an email with the log, diffstat, and patch in it. If there are multiple commits the subject of the email will be [PATCH 1/n] <first line of commit>. When you're dealing with many patches a day this gets the point across fast.Better yet:
git send-email origin
Same thing as above, but it hooks into your system's sendmail and sends the patch email(s) for you.On the receiving end, you've got:
git apply --check <patches>
You can make sure they'll actually work against your copy before diving in.And most important to Linus is probably:
git am --signoff
Which can hook into your mailbox and apply all the patches with commit messages and add the Signed-off-by line with your email account.So if your workflow consists of looking at a patch in the terminal, then applying and committing that patch many times a day these things are very important to you and they provide you with the information you need very quickly.
Compare that to the point-and-click web interface of github, sure it works at low volumes but when you scale it up it becomes clumsy and slow.
I suspect his complaints about commit formatting and quality of github contributors doesn't help are more of the two more annoyances variety.
The rest of it was Linus being a prima donna (rather than just specifying formatting guidelines that would be easy to observe with pull requests) because he knows he can get away with it.
My take on it is that there are a very large number of morons out there on the internet, and just as you don't want to hire B or C people in a startup, you don't want morons trying to contribute to an open source project. B and C people add negative value to a company, not just with their bad ideas and bad code, but in wasting the time of the A people in cleaning up after their bad ideas and bad code. Why does anyone think it will be any different in an open source project?
Hence, if you have someone who has demonstrably acted like an idiot, you really are better off driving them away from the project (fortunately many of these idiots have thin skins, and can be easily driven away). There is a risk that someone who isn't a moron and who sees someone else who does deserve this treatment might decide to go away, but the chances of this are low, especially if you treat non-idiots well. Also, just from a probability point of view, especially on the internet, unfortunately the morons vastly out-number the non-morons (see 4chan for proof of this :-), so if you don't do this, you will get swamped.
There's also the probability that someone who acts like a moron could be trained how to be less moron-like, but personally, someone who says something like "Linus's shit doesn't stink" is probably someone I would treat as a NO HIRE in an interview situation; maybe they could learn, but you don't take those chances when interviewing potential engineers for a startup. They can learn at some other companies, and try again to go through the interview process later after they've gained some experience.
The rest of the points about identities, etc, are entirely valid, but I don't really see anyone objecting to Linus's view on those.
Please refer to his comments.
Emulate Linus' style in commit messages if you wish.
Don't emulate the abrasiveness in his style of communicating (unless you have a track record as good as his).