diff --git a/.git-blame-ignore-revs b/.git-blame-ignore-revs new file mode 100644 index 00000000..55b1bc8a --- /dev/null +++ b/.git-blame-ignore-revs @@ -0,0 +1,15 @@ +# Run shfmt on bash files +b8dc5f160447baabab9c69683824512ded577254 + +# fix: Remove == inside [ (#1421) +d81b81f9de2dc5961624464df04cef7cafae588c + +# chore: Fix ShellCheck errors in tests +407a6696c0739f5e368543c4fc1b14e41458f177 +998180e3625643644603504bea75e3bcc668465f +6f64aa8d847d53f272d30bcf2532937c02826080 +b5e981cf1d9a37af17e48f6a871ff692720df810 +28b348a041b3dfd1898eb0073aa1e83bdae70e4a +720fd172004c9f29045eb2ad19f35eba47ae31c7 +ffa018763c10de63e6548372e7eaad2ae53643d6 +90ead5ea0ae06418c58a47f4c7732797af5fe336 diff --git a/docs/contribute/core.md b/docs/contribute/core.md index f637d76f..371cf68a 100644 --- a/docs/contribute/core.md +++ b/docs/contribute/core.md @@ -64,6 +64,33 @@ The following is the `.gitignore` file in the `asdf-vm/asdf` repository. We igno @[code](../../.gitignore) +### `.git-blame-ignore-revs` + +`asdf` uses a `.git-blame-ignore-revs` to reduce noise when running a blame. See the [git blame documentation](https://git-scm.com/docs/git-blame) for more information. + +Use the file with `git blame` like so: + +```sh:no-line-numbers +git blame --ignore-revs-file .git-blame-ignore-revs ./test/install_command.bats +``` + +Optionally, configure to use the file on every invocation of `blame` without manually supplying it: + +```sh:no-line-numbers +git config blame.ignoreRevsFile .git-blame-ignore-revs +``` + +It is possible to configure IDEs to use this file. For example, when using VSCode (with [GitLens](https://marketplace.visualstudio.com/items?itemName=eamodio.gitlens)), write the following to `.vscode/settings.json`: + +```json:no-line-numbers +{ + "gitlens.advanced.blame.customArguments": [ + "--ignore-revs-file", + ".git-blame-ignore-revs" + ] +} +``` + ## Bats Testing It is **strongly encouraged** to examine the existing test suite and the [bats-core documentation](https://bats-core.readthedocs.io/en/stable/index.html) before writing tests.