In this page

This article was Midori's April Fools' fake news released on 1 April 2017

As you may or may not noticed, this article is not to be taken 100% seriously. While the below method to reject rude commit messages would definitely work, we do not advocate for overusing commit rules. Commit message is a super-important, but often neglected part of source code management.

We promote and help you to develop the good habits of writing consistent and useful commit messages.

Would you explicitly swear to your co-workers' face at a code review? Or to the face of your customers at a meeting? Hopefully not. It should not be part of a sophisticated team's discussions. In order to help developers with self-respect express themselves in a more gentle manner in their commit messages, Midori introduces the Curse-Free Commit Condition as part of Better Commit Policy for Jira.

We at Midori are excited to launch this initiative that promises to solve the most daunting communication issues around commit verification and source code management. Research shows that code that comes out of a curse-free development environment is 87.23% more stable and performs 21.6% faster in most circumstances!

This level of improvement is now achievable for your software project as well, and it all starts with the commit message. We have worked long hours to dig deep into the depths of public Bitbucket and GitHub repos, applied BigData analytics to all those commit messages and experimented with the results. As a result, Better Commit Policy introduces a configurable condition to enforce curse-free commit messages!

Why should I write those f*ckin' commit messages, b*tch?

There has been a lot said about how and why to compose a good commit message, but industry experience shows that this topic is still fairly inferior to many software teams. To these teams, attaching a message is a burden and unnecessary brain-work that should be ignored at all costs. What's more, they often use this opportunity to let the steam out and rant about pretty much anything: languages, libraries, Version Control Systems, IDEs, the customer's ability to assess their work, or the existence of the QA department and that nosy tester guy, particularly.

If you need proof of that, you don't have to look too long: this research looked at 40.000 commit messages per programming language and found VimL (Vim script) the "most angry language", with C being the runner up! Java, the language of choice for building enterprise software (Jira included!) is also at the 4th spot. C# developers at the same time are chilled as... a cucumber. Is it a coincidence?

You get the point by now.

Cursing and swear words might be funny once, but they don't help maintaining a useful, traceable commit log and undermine its very purpose of keeping changes for the long run in a well-documented and readable format. Some may think that it is funny to comment commits like:

Fixed and commented out pauls sh*t untill he will fix that

When you fuck up using fuck fuck doesn't unfuck your fuck-up

way to go asshole u ruined the redirect!!!

Docker-ize this Bitch!

While the rendering is faster, on iOS it's like Pushing sh*t up hill with some of these typefaces...

f*ck it. let's release

If you do not fucking support https fucking say it motherfucker.

Nowadays who give a fuck to these shits ?

Repeated fucking fucks up with UnicodeDecodeError (Python 2.7.6)

unfucks code via ternary, bitch!

English, motherfucker, do you speak it?

...but if the whole commit log resembles some hardcore rap lyrics, then good luck to the poor engineer who needs to make sense of all that at the next merge or code review.

Create your own commit message policy

You can't help your team members develop better taste, but with Better Commit Policy for Jira, you can set up smart rules for commit messages. Those can be verified even before the commit is made, to make your repository's change log a delight to read!

Depending on your preferred level of control, you can be less strict and require only a few basic attributes, like minimum character count or a valid committer email address. If you don't want to get invited to any more of those after work beers on Fridays, you can turn into a real commit nazi. You can require the committer user to have a valid company email address and be member in a certain Jira group. Moreover, you can require the mention of exactly one Jira issue key which references an issue which is assigned to the committer user and is in the "In progress" status, in each commit.

If it's still not enough, now Midori enables you to step up your game by rejecting commits that have profanity in commit messages!

How? The following regular expression used with the "Commit message must match a pattern" condition will reject the commits that have at least one of the most popular curse words used in America (based on a research done on Twitter) or one of the Seven Dirty Words!


So, think again: do you bother?

Do you have taste? Do you care about commit logs? (Do you want your mum be proud of you?)

You should, for the sake of the quality of your team's work and also to not let Linus Torvalds down, as this guy did on Github. That would be a shame.

Learn how to promote good commit message practice