Commit guidelines

From Navit's Wiki
Revision as of 08:02, 22 March 2010 by Akashihi (talk | contribs) (Added to development category)
Jump to: navigation, search

Here are the current guidelines if you want to commit something :

'Core' components changes

Do not modify a 'core' component without discussing it first with the project leads.

Core components include data structures, configuration handling. If you are unsure, just ask.

Commit per file

Avoid committing a whole folder, especially navit's sourcecode root. It would almost always update timestamps in the translations files, and generate a lot of useless commit log entries. So, as a general guideline, commit each needed file namely.

Format of the commit log

Since we are too lazy to maintain a changelog, we have a script which parses the commit logs and generate a changelog for us.

We have agreed about using the following syntax :

<Action>:<component>:<log message>[|Optionnal comments]

Examples :

Fix:Core:Fixed nasty bug in ticket #134
Fix:GTK:Fixed nasty bug about destination button|Thanks someguy for the patch!

Action can be something like:

  • Fix
  • Add
  • Patch

It allows the changes to be sorted by categories

Component is the component field in the bug tracker. The most common are :

  • core
  • gui/gtk (often shortened as 'gtk')
  • gui/cegui (often shortened as 'cegui')
  • graphics/gtk
  • graphics/opengl
  • mapdriver
  • tools

...

The comment part is optionnal. Useful for when applying a patch for example, and giving credits. The part after | will not appear in the wiki.


About the log message, it's up to you :)