diff options
author | Martin Schanzenbach <mschanzenbach@posteo.de> | 2021-04-03 09:40:46 +0200 |
---|---|---|
committer | Martin Schanzenbach <mschanzenbach@posteo.de> | 2021-04-03 09:40:46 +0200 |
commit | 08fe7735b091d10d199a4240ecf22792ea79864b (patch) | |
tree | 7ebd10fda3aef3ad8217339ffbf8fe768e7c4079 /doc/handbook | |
parent | 13be4dfd696492007a0ae776d96757d17f62cfd4 (diff) | |
download | gnunet-08fe7735b091d10d199a4240ecf22792ea79864b.tar.gz gnunet-08fe7735b091d10d199a4240ecf22792ea79864b.zip |
handbook: Add section on commit messages and developer branches
Diffstat (limited to 'doc/handbook')
-rw-r--r-- | doc/handbook/chapters/developer.texi | 70 |
1 files changed, 70 insertions, 0 deletions
diff --git a/doc/handbook/chapters/developer.texi b/doc/handbook/chapters/developer.texi index 8b0085cce..9bb74c3de 100644 --- a/doc/handbook/chapters/developer.texi +++ b/doc/handbook/chapters/developer.texi | |||
@@ -689,6 +689,7 @@ Here you can find some rules to help you write code for GNUnet. | |||
689 | @menu | 689 | @menu |
690 | * Naming conventions:: | 690 | * Naming conventions:: |
691 | * Coding style:: | 691 | * Coding style:: |
692 | * Commit messages and developer branches:: | ||
692 | @end menu | 693 | @end menu |
693 | 694 | ||
694 | @node Naming conventions | 695 | @node Naming conventions |
@@ -1093,6 +1094,75 @@ fun (short i, | |||
1093 | 1094 | ||
1094 | @end itemize | 1095 | @end itemize |
1095 | 1096 | ||
1097 | @cindex Commit messages and developer branches | ||
1098 | @node Commit messages and developer branches | ||
1099 | @subsection Commit messages and developer branches | ||
1100 | |||
1101 | You can find the GNUnet project repositories at @uref{https://git.gnunet.org}. | ||
1102 | For each release, the ChangeLog file is generated from the commit history. | ||
1103 | Hence, commit messages are required to convey what changes were made in | ||
1104 | a self-contained fashion. Commit messages such as "fix" or "cleanup" are | ||
1105 | not acceptable. | ||
1106 | You commit message should ideally start with the subsystem name and be followed | ||
1107 | by a succinct description of the change. Where applicable a reference to | ||
1108 | a bug number in the bugtracker may also be included. | ||
1109 | Example: | ||
1110 | |||
1111 | @example | ||
1112 | # <subsystem>: <description>. (#XXXX) | ||
1113 | IDENTITY: Fix wrong key construction for anonymous ECDSA identity. (Fixes #12344) | ||
1114 | @end example | ||
1115 | |||
1116 | If you need to commit a minor fix you may prefix the commit message with a | ||
1117 | dash. It will then be ignored when generating the ChangeLog entries: | ||
1118 | |||
1119 | @example | ||
1120 | # -<text> | ||
1121 | -fix | ||
1122 | @end example | ||
1123 | |||
1124 | If you need to modify a commit you can do so using: | ||
1125 | |||
1126 | @example | ||
1127 | $ git commit --amend | ||
1128 | @end example | ||
1129 | |||
1130 | If you need to modify a number of successive commits you will have to rebase | ||
1131 | and squash. | ||
1132 | Note that most branches are protected. This means that you can only fix commits | ||
1133 | as long as they are not pushed. You can only modify pushed commits in your own | ||
1134 | developer branches. | ||
1135 | |||
1136 | A developer branch is a branch which matches a developer-specific prefix. | ||
1137 | As a developer with git access, you should have a git username. If you do not | ||
1138 | know it, please ask an admin. | ||
1139 | A developer branch has the format: | ||
1140 | |||
1141 | @example | ||
1142 | dev/<username>/<branchname> | ||
1143 | @end example | ||
1144 | |||
1145 | |||
1146 | Assuming the developer with username "jdoe" wants to create a new branch for an | ||
1147 | i18n fix, the branch name could be: | ||
1148 | |||
1149 | @example | ||
1150 | dev/jdoe/i18n_fx | ||
1151 | @end example | ||
1152 | |||
1153 | The developer will be able to force push to and delete branches under his prefix. | ||
1154 | It is highly recommended to work in your own developer branches. | ||
1155 | Code which conforms to the commit message guidelines and coding style, is tested | ||
1156 | and builds may be merged to the master branch. | ||
1157 | Preferably, you would then... | ||
1158 | |||
1159 | @itemize | ||
1160 | @item ...squash your commits, | ||
1161 | @item rebase to master and then | ||
1162 | @item merge your branch. | ||
1163 | @item (optional) Delete the branch. | ||
1164 | @end itemize | ||
1165 | |||
1096 | @c *********************************************************************** | 1166 | @c *********************************************************************** |
1097 | @node Build-system | 1167 | @node Build-system |
1098 | @section Build-system | 1168 | @section Build-system |