[Openvpn-devel,v2] Add .git-blame-ignore-revs with reformat commits

Message ID 20200604235338.11728-1-arne@rfc2549.org
State Accepted
Headers show
Series [Openvpn-devel,v2] Add .git-blame-ignore-revs with reformat commits | expand

Commit Message

Arne Schwabe June 4, 2020, 1:53 p.m. UTC
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>
---
 .git-blame-ignore-revs                        | 39 +++++++++++++++++++
 .../managent-demo/management-demo-server.py   |  0
 contrib/ovpnkeys.py                           |  0
 3 files changed, 39 insertions(+)
 create mode 100644 .git-blame-ignore-revs
 create mode 100644 contrib/managent-demo/management-demo-server.py
 create mode 100644 contrib/ovpnkeys.py

diff --git a/contrib/managent-demo/management-demo-server.py b/contrib/managent-demo/management-demo-server.py
new file mode 100644
index 00000000..e69de29b
diff --git a/contrib/ovpnkeys.py b/contrib/ovpnkeys.py
new file mode 100644
index 00000000..e69de29b

Comments

David Sommerseth June 10, 2020, 1:49 a.m. UTC | #1
On 05/06/2020 01:53, Arne Schwabe wrote:
> 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>
> ---
>  .git-blame-ignore-revs                        | 39 +++++++++++++++++++
>  .../managent-demo/management-demo-server.py   |  0
>  contrib/ovpnkeys.py                           |  0
>  3 files changed, 39 insertions(+)
>  create mode 100644 .git-blame-ignore-revs
>  create mode 100644 contrib/managent-demo/management-demo-server.py
>  create mode 100644 contrib/ovpnkeys.py
> 
> diff --git a/.git-blame-ignore-revs b/.git-blame-ignore-revs
> new file mode 100644
> index 00000000..6d9b374f
> --- /dev/null
> +++ b/.git-blame-ignore-revs
> @@ -0,0 +1,39 @@
> +# This FILE allows git blame to ignore reformatting changes and instead
> +# shows 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. TO 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
> +
> +
> +# Uncrustify the tests/unit_tests/ part of our tree.
> +da1574ef7826d73f01e120cbd1ba40ce39a305b7
> +
> +# Another round of uncrustify code cleanup.
> +9cf7b4925a54d93fbea1cadcf3dc0e11f3ce358f
> +
> +# networking_sitnl.c: uncrustify file
> +2c45d268ca65c522fbabb7c4dab5e721296b4623
> +
> +# Uncrustify tapctl and openvpnmsica
> +6280d3d5536174934ee22d3840457d61896e0e3a
> +
> +# tun.c: uncrustify
> +baef44fc8769bbd99f4d699ce9f63180c29a5455
> +
> +# networking_sitnl.c: uncrustify file
> +2c45d268ca65c522fbabb7c4dab5e721296b4623
> +
> +# uncrustify openvpn sources
> +f57431cdc88f22fa4d7962946f0d3187fe058539
> +
> +# More broadly enforce Allman style and braces-around-conditionals
> +4cd4899e8e80efae03c584a760fd107251735723
> +
> +# The Great Reformatting - first phase
> +81d882d5302b8b647202a6893b57dfdc61fd6df2
> diff --git a/contrib/managent-demo/management-demo-server.py b/contrib/managent-demo/management-demo-server.py

This looks good.

> new file mode 100644
> index 00000000..e69de29b
> diff --git a/contrib/ovpnkeys.py b/contrib/ovpnkeys.py
> new file mode 100644
> index 00000000..e69de29b
> 

Why do you keep on adding this file ;-)

I'd say this file could be removed at apply time.

Acked-By: David Somerseth <davids@openvpn.net>
Gert Doering June 10, 2020, 1:55 a.m. UTC | #2
Great discovery, much appreciated :-) - and I have not added the two
dangling new files in this patch.

Your patch has been applied to the master branch.

commit e0b49cb95286a62a4e615470c6d3fe841b433314
Author: Arne Schwabe
Date:   Fri Jun 5 01:53:38 2020 +0200

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

     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>


--
kind regards,

Gert Doering

Patch

diff --git a/.git-blame-ignore-revs b/.git-blame-ignore-revs
new file mode 100644
index 00000000..6d9b374f
--- /dev/null
+++ b/.git-blame-ignore-revs
@@ -0,0 +1,39 @@ 
+# This FILE allows git blame to ignore reformatting changes and instead
+# shows 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. TO 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
+
+
+# Uncrustify the tests/unit_tests/ part of our tree.
+da1574ef7826d73f01e120cbd1ba40ce39a305b7
+
+# Another round of uncrustify code cleanup.
+9cf7b4925a54d93fbea1cadcf3dc0e11f3ce358f
+
+# networking_sitnl.c: uncrustify file
+2c45d268ca65c522fbabb7c4dab5e721296b4623
+
+# Uncrustify tapctl and openvpnmsica
+6280d3d5536174934ee22d3840457d61896e0e3a
+
+# tun.c: uncrustify
+baef44fc8769bbd99f4d699ce9f63180c29a5455
+
+# networking_sitnl.c: uncrustify file
+2c45d268ca65c522fbabb7c4dab5e721296b4623
+
+# uncrustify openvpn sources
+f57431cdc88f22fa4d7962946f0d3187fe058539
+
+# More broadly enforce Allman style and braces-around-conditionals
+4cd4899e8e80efae03c584a760fd107251735723
+
+# The Great Reformatting - first phase
+81d882d5302b8b647202a6893b57dfdc61fd6df2