Browse code

Add .git-blame-ignore-revs with reformat commits

This allows git blame to ignore reformatting changes and instead
to show the previous commit that changed the line.

To avoid manually building the list of commits this commit
adds a file with a list of reformatting commits. I might have
missed a few but this should be a good start. To use the file
use:

git blame --ignore-revs-file=.git-blame-ignore-revs file

or to automatically always use the file

git config blame.ignoreRevsFile .git-blame-ignore-revs

Naming the file .git-blame-ignore-revs is a convention.

Some more details in this random blog post:

https://www.moxio.com/blog/43/ignoring-bulk-change-commits-with-git-blame

Patch V2: Remove merge commit of the great formatting, add small
reminder how to use the feature at the top of the file

Signed-off-by: Arne Schwabe <arne@rfc2549.org>
Acked-by: David Sommerseth <davids@openvpn.net>
Message-Id: <20200604235338.11728-1-arne@rfc2549.org>
URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg19967.html
Signed-off-by: Gert Doering <gert@greenie.muc.de>

Arne Schwabe authored on 2020/06/05 08:53:38
Showing 1 changed files
1 1
new file mode 100644
... ...
@@ -0,0 +1,39 @@
0
+# This FILE allows git blame to ignore reformatting changes and instead
1
+# shows the previous commit that changed the line.
2
+#
3
+# To avoid manually building the list of commits this commit
4
+# adds a file with a list of reformatting commits. TO use:
5
+#
6
+#   git blame --ignore-revs-file=.git-blame-ignore-revs file
7
+#
8
+# or to automatically always use the file
9
+#
10
+#   git config blame.ignoreRevsFile .git-blame-ignore-revs
11
+
12
+
13
+# Uncrustify the tests/unit_tests/ part of our tree.
14
+da1574ef7826d73f01e120cbd1ba40ce39a305b7
15
+
16
+# Another round of uncrustify code cleanup.
17
+9cf7b4925a54d93fbea1cadcf3dc0e11f3ce358f
18
+
19
+# networking_sitnl.c: uncrustify file
20
+2c45d268ca65c522fbabb7c4dab5e721296b4623
21
+
22
+# Uncrustify tapctl and openvpnmsica
23
+6280d3d5536174934ee22d3840457d61896e0e3a
24
+
25
+# tun.c: uncrustify
26
+baef44fc8769bbd99f4d699ce9f63180c29a5455
27
+
28
+# networking_sitnl.c: uncrustify file
29
+2c45d268ca65c522fbabb7c4dab5e721296b4623
30
+
31
+# uncrustify openvpn sources
32
+f57431cdc88f22fa4d7962946f0d3187fe058539
33
+
34
+# More broadly enforce Allman style and braces-around-conditionals
35
+4cd4899e8e80efae03c584a760fd107251735723
36
+
37
+# The Great Reformatting - first phase
38
+81d882d5302b8b647202a6893b57dfdc61fd6df2