63 | | |
64 | | == Git Commit Messages == |
65 | | {{{ |
66 | | #!comment |
67 | | This should probably have it's own page but putting here for now. |
68 | | }}} |
69 | | Mainly based on [http://git-scm.com/book/en/Distributed-Git-Contributing-to-a-Project#Commit-Guidelines git commit guidelines]. |
70 | | |
71 | | Example commit message: |
72 | | |
73 | | {{{ |
74 | | Short summary of changes (preferably 50 characters or less) |
75 | | |
76 | | More detailed explanatory text, if necessary. Wrap it to about 72 |
77 | | characters or so. The first line can be considered as the subject of an |
78 | | email and the rest of the text as the body. The blank line separating |
79 | | the summary from the body is critical, unless you omit the body entirely. |
80 | | |
81 | | Further paragraphs come after blank lines. |
82 | | |
83 | | - Bullet points are okay, too |
84 | | |
85 | | - Typically a hyphen or asterisk is used for the bullet, preceded by a |
86 | | single space, with blank lines in between, but conventions vary here |
87 | | }}} |
88 | | |
89 | | A general guideline on writing a good commit message is to provide information |
90 | | that is not already provided from the commit diff, which in essence is "''the why, not the how''". |
91 | | |
92 | | * Explain why the change is necessary |
93 | | |
94 | | After reading the commit message it should should be apparent why the changes were made. |
95 | | |
96 | | * Explain how the issue is adressed in broad terms |
97 | | |
98 | | It is not necessary to explain how the changes are made in detail as that can be seen from the commit diff. |
99 | | |
100 | | |
101 | | === Tags / Labels === |
102 | | To differentiate commit changes at a glance, the subject of commits for specific components should be prefixed with relevant tags/labels, such as |
103 | | |
104 | | ''Core'', ''WebUI'', ''GTKUI'', ''Tests'', ''win32'', ''Packaging'', ''Console'', ''Blocklist'' etc. |
105 | | |
106 | | {{{[GTKUI] Make Add Dialog torrent name editable}}} |
107 | | |
108 | | If the commit fix/closes a ticket, include the number: |
109 | | |
110 | | {{{[#1001] Add support for magnet uris}}} |
111 | | |
112 | | A limited number of tags may be combined, such as |
113 | | |
114 | | {{{[#1002] [GTKUI] Fix the files tab context menu not being displayed}}} |
115 | | |
116 | | {{{[#2250] [Core] [GTKUI] Added method remove_torrents to core}}} |
117 | | |
118 | | |