chore: provide .git-blame-ignore-revs for easier investigation (#1465)

This commit is contained in:
Edwin Kofler 2023-01-28 21:33:23 -08:00 committed by GitHub
parent e0fd7a7be8
commit a91b6d0ee3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 42 additions and 0 deletions

15
.git-blame-ignore-revs Normal file
View File

@ -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

View File

@ -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.