This is an old revision of the document!


GIT Commit Guidelines

Not an absolute MUST, but it SHOULD be used almost always. It helps to track changes and follow the development easier (better commit mail messages and Changelogs are easier to generate).

Commit message

Please create the commit messages following the git convention:

  • start with one short line, preferably less then 50 chars summarising the changes (this is referred later as "first line of the commit message")
  • then one empty line
  • then a more detailed description

Think of the first line as of an email "Subject" line. In fact it will be used as "Subject" in the generated commit mails and it will also be used when generating the Changelog (e.g. git log –pretty=oneline). Please start always with the prefix of the subsystem that is modified by the commit (e.g.: "core: typo fixes", "tcp: stun fixes", "mem: faster malloc", "module_name: support for foo", "lib_name: critical bug fix").

Examples:

usrloc: fixed name conflict

 - destroy_avps() renamed to reg_destroy_avps() to avoid conflicts
   with the usr_avp.h version.
core: loadpath can now use a list of directories

- loadpath can use a list of directories separated by ':',
  e.g.: loadpath "modules:modules_s:modules_k".
  First match wins (e.g. for loadmodule "textops" if
  modules/textops.so or modules/textops/textops.so exists, it will
  be loaded and the search will stop).

See:

Generic Guidelines

  • split big changes across many parts of the code (e.g., parser, memory manager, modules, ..) in smaller chunks that affect only one part. It is easier to track the changes

Core Commits

  • prefix the first line of the commit message with "core:"

Module Commits

  • prefix the first line of the commit message with "module name:"

Library Commits

  • prefix the first line of the commit message with "library name:"

Navigation

Wiki

Other

QR Code
QR Code devel:git-commit-guidelines (generated for current page)