Commit Messages

From Zentyal Linux Small Business Server
Jump to: navigation, search

Commit messages standard

This is a draft standard for commit messages. The policy is enforced for every commit to trunk or a maintenance branch, so if it doesn't contain a tag it will be rejected.

These are the available tags:

  1. NN - Null tag. If no tag applies, use this one to trick the commit hook (the purpose of this is to avoid people forgetting the existence of tags. If you don't want a tag you have to explicitly say so).
  2. BP - Backport. This tag indicates that this fix should be backported.
  3. ND - Needs doc. This tag indicates that this commit requires documentation to be created or updated.
  4. BT - Breaks test. This tag indicates that this commit breaks an existing ANSTE test.

The pre-commit hook just checks that the commit log contains at least one of this tags, or more separated by commas.

The post-commit hook will create appropriate tickets for the BP, ND and BT tags.

An example would be:

ND,BT: Fix the form for new grisbos

This would create two tickets about fixing the anste tests and updating the documentation. The tickets will be assigned to the appropriate milestone depending on whether the commit was to trunk or to one of the maintenance branches.

The recommendation is to deal with these tickets as soon as possible. ND and BT tickets should probably be taken care of by the committer, while BP tickets should probably be dealt with by the committer and the branch maintainer. In the worst case at least we will be aware of the existence of these problems.


Personal tools


Zentyal Wiki

Zentyal Doc