summary refs log tree commit diff
path: root/CONTRIBUTING
diff options
context:
space:
mode:
authorMichael Biebl <biebl@debian.org>2020-10-05 22:27:18 +0200
committerMichael Biebl <biebl@debian.org>2020-10-05 22:27:18 +0200
commitaafc1dbe4712c86189bbc1d4d54ad8cb4c69be7e (patch)
treea2a9bb4d007339a0b1304540388230ccedac32bd /CONTRIBUTING
parente7b44ef4c80907346ec7492a09c45277459924fc (diff)
New upstream version 1.27.90 upstream/1.27.90
Diffstat (limited to 'CONTRIBUTING')
-rw-r--r--CONTRIBUTING43
1 files changed, 31 insertions, 12 deletions
diff --git a/CONTRIBUTING b/CONTRIBUTING
index 32f132ed..c157614e 100644
--- a/CONTRIBUTING
+++ b/CONTRIBUTING
@@ -4,20 +4,14 @@ Guidelines for Contributing
 Coding Standard
 ---------------
 
-Coding standards are generally GNOME coding standards, with these exceptions:
-    a) 4 space tabs  (_not_ 8-space tabs)
-    b) REAL tabs (_not_ a mix of tabs and spaces in the initial indent)
-    c) spaces used to align continuation lines past the indent point of the
-       first statement line, like so:
+* The formatting uses clang-format with clang 11.0. Run
+  `./contrib/scripts/nm-code-format.sh -i` to reformat.
 
-		if (   some_really_really_long_variable_name
-		    && another_really_really_long_variable_name) {
-			...
-		}
+* Indent with 4 spaces. (_no_ tabs).
 
-* Keep a space between the function name and the opening '('.
-    GOOD: g_strdup (x)
-    BAD:  g_strdup(x)
+* Have no space between the function name and the opening '('.
+    GOOD:  g_strdup(x)
+    BAD:  g_strdup (x)
 
 * C-style comments
     GOOD: f(x);  /* comment */
@@ -118,3 +112,28 @@ For testing, you also want to run NetworkManager with environment variable
 G_DEBUG=fatal-warnings to crash upon G_LOG_LEVEL_CRITICAL and G_LOG_LEVEL_WARNING
 g_log() message. NetworkManager won't use these levels for regular logging
 but for assertions.
+
+
+Git Notes (refs/notes/bugs)
+---------------------------
+
+There are special notes to annotate git commit messages with information
+about "Fixes" and "cherry picked from". Annotating the history is useful
+if it was not done initially because our scripts can make use of it.
+
+The notes it are called "refs/notes/bugs".
+
+So configure:
+
+  $ git config --add 'remote.origin.fetch' 'refs/notes/bugs:refs/notes/bugs'
+  $ git config --add 'notes.displayref' 'refs/notes/bugs'
+
+For example, set notes with
+
+  $ git notes --ref refs/notes/bugs add -m "(cherry picked from $COMMIT_SHA)" HEAD
+
+You should see the notes in git-log output as well.
+
+To resync our local notes use:
+
+  $ git fetch origin refs/notes/bugs:refs/notes/bugs -f