From ec2fd8de4e123ccb45afc866880171963b82cb5f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Hurlin?= Date: Tue, 3 Sep 2024 12:23:25 +0200 Subject: [PATCH 1/2] Add .git-blame-ignore-revs file --- .git-blame-ignore-revs | 1 + 1 file changed, 1 insertion(+) create mode 100644 .git-blame-ignore-revs diff --git a/.git-blame-ignore-revs b/.git-blame-ignore-revs new file mode 100644 index 0000000000..c43388fcee --- /dev/null +++ b/.git-blame-ignore-revs @@ -0,0 +1 @@ +9d1fd093071278be77428dba189d958d5b7a7aeb From fcdadf7c366493871e4cd845dd72995d35be3dcd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Hurlin?= Date: Tue, 3 Sep 2024 12:51:11 +0200 Subject: [PATCH 2/2] Mention .git-blame-ignore-revs file in CONTRIBUTING.md --- CONTRIBUTING.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index b4dbaced61..4537c3b583 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -66,3 +66,11 @@ See the [RELEASING.md](RELEASING.md) for instructions. Please note that libraries need bounds on the version of their dependencies to avoid bitrot and be effectively reusable. [CHaP]: https://github.com/input-output-hk/cardano-haskell-packages + +## Improving `git blame` + +You can have `git blame` ignore the reformatting done when [introducting fourmolu](https://github.com/IntersectMBO/cardano-cli/pull/835/commits/9d1fd093071278be77428dba189d958d5b7a7aeb) by specifying `blame.ignoreRevsFile` to `.git-blame-ignore-revs` in your repository's git configuration. Do it as follows: + +```shell +git config --local blame.ignoreRevsFile .git-blame-ignore-revs +```