summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2020-10-27 15:53:41 +0100
committerThomas Haller <thaller@redhat.com>2020-10-27 16:00:45 +0100
commit1cda792206ae4ea72fd3ecd891f665933565adc7 (patch)
tree5f61d70c6024656be1545a79ebc02e5a0e674efd
parent39026b64eb81f963e1e31e7be5a8996eaa5c2218 (diff)
downloadNetworkManager-1cda792206ae4ea72fd3ecd891f665933565adc7.tar.gz
format: add ".git-blame-ignore-revs" and hint how to ignore the commit during git-blame
-rw-r--r--.git-blame-ignore-revs7
-rw-r--r--CONTRIBUTING14
2 files changed, 18 insertions, 3 deletions
diff --git a/.git-blame-ignore-revs b/.git-blame-ignore-revs
new file mode 100644
index 0000000000..52f236506d
--- /dev/null
+++ b/.git-blame-ignore-revs
@@ -0,0 +1,7 @@
+# The commits that did automated reformatting. You can ignore them
+# during git-blame with `--ignore-rev` or `--ignore-revs-file`.
+#
+# $ git config --add 'blame.ignoreRevsFile' '.git-blame-ignore-revs'
+#
+328fb90f3e0d4e35975aff63944ac0412d7893a5
+740b092fda3d5f45102422f22884c88ea6c42858
diff --git a/CONTRIBUTING b/CONTRIBUTING
index d948bbbc2a..8335cbfdf6 100644
--- a/CONTRIBUTING
+++ b/CONTRIBUTING
@@ -14,13 +14,21 @@ You are welcome to not bother and open a merge request with
wrong formatting, but note that we then will automatically adjust
your contribution before merging.
+The automatic reformatting was done by commit 328fb90f3e0d4e35975aff63944ac0412d7893a5.
+Use `--ignore-rev` option or `--ignore-revs-file .git-blame-ignore-revs` to ignore
+the reformatting commit with git-blame:
+
+```
+$ git config --add 'blame.ignoreRevsFile' '.git-blame-ignore-revs'
+```
+
Since our coding style is entirely automated, the following are just
some details of the style we use:
* Indent with 4 spaces. (_no_ tabs).
* Have no space between the function name and the opening '('.
- - GOOD: `g_strdup(x)`
+ - GOOD: `g_strdup(x)`
- BAD: `g_strdup (x)`
* C-style comments
@@ -28,8 +36,8 @@ some details of the style we use:
- BAD: `f(x); // comment`
* Keep assignments in the variable declaration area pretty short.
- - GOOD: `MyObject *object;`
- - BAD: `MyObject *object = complex_and_long_init_function(arg1, arg2, arg3);`
+ - GOOD: `MyObject *object;`
+ - BAD: `MyObject *object = complex_and_long_init_function(arg1, arg2, arg3);`
* 80-cols is a guideline, don't make the code uncomfortable in order to fit in
less than 80 cols.