Changes between Version 8 and Version 9 of Submitting/General


Ignore:
Timestamp:
Jun 27, 2014, 7:35:15 AM (10 years ago)
Author:
wenzeslaus
Comment:

add info about Commit Messages (wiki:Submitting/General#Commitmessages)

Legend:

Unmodified
Added
Removed
Modified
  • Submitting/General

    v8 v9  
    99
    1010Such diffs should be made from the top-level directory, e.g. `svn diff display/d.vect/main.c`; that way, the diff will include the pathname rather than just an ambiguous `main.c`.
     11
     12=== Commit messages ===
     13
     14General pattern:
     15
     16{{{
     17module or library: description (possible Trac ticket, merge commit or related commit)
     18}}}
     19
     20Examples (of single line commit messages):
     21
     22{{{
     23r.to.vect: corrected x in the crowded message
     24g.mremove: Changed the interface to that of g.mlist and added exclude= (ticket #2228)
     25libraster: Added raster name and row info to get/put_row error messages
     26vlib/pg: column check must be case-insensitive
     27wxGUI/lmgr: add measuring of distances also to Layer Manager
     28wxGUI: workaround for not visible toolbars on Mac with wxPython 3
     29}}}
     30
     31Include ticket using hash mark and ticket number, e.g. `#2228`, and another commit (revision) using letter r and revision number, e.g. `r60975`. This will allow Trac (and perhaps other systems) to create a link to the ticket or commit (or revision). However, do not rely on this and always include the information about what and why the commit is changing and how (consider browsing commit messages in command line).
     32
     33It is possible and allowed to do multiline commit messages but you should consider the following. First, multiline commit messages should be used to provide further details about the commit. They should not be used to describe large changes of code. Instead, these large changes should be split into the separate commits with shorted commit messages. Note that this not only simplifies writing of good, simple and readable commit messages but it also makes code review and regression testing easier. Second, if you have a lot to say about the commit you should perhaps include this in the comments or documentation (you can refer there to tickets or other commits too in the same way as in commit messages, although they will not be automatically linked).
     34
     35Write the commit messages in the way that they can be used to create/update change logs, wiki:Release pages and news in general.
     36
     37Don't include your name (or id) to commit message, this is stored separately and automatically. However, if you are committing someone's code (e.g. path) or you are writing the code together with someone, include his or her name.
     38
     39Include the module, library or component name as a prefix separated by colon, e.g. `libraster:`. You don't have to include file names in the commit message, they are managed by SVN itself.
     40
     41If you are not sure if your style is correct, ask on mailing list.
     42
     43Some bad examples (of single line commit messages):
     44{{{
     45wxGUI/render: attempt to fix #560
     46(missing information what is #560 and how we are trying to fix it)
     47
     48Add tests for Table and Columns classes
     49(we don't know where the classes belongs to, prefix pygrass: or pythonlib/pygrass would tell us in this case)
     50
     51fix bug introduced in r60216
     52(missing information how the bug was fixed and which bug it was)
     53
     54fix r60216 (i18n)
     55(it should probably say something like: wxGUI: fix insufficient handling of i18n (introduced in r60216))
     56
     57libraster:Added raster name and row info to get/put_row error messages
     58(missing space after colon)
     59}}}
     60
    1161
    1262=== SVN Properties ===