diff options
| author | 许杰友 Jieyou Xu (Joe) <39484203+jieyouxu@users.noreply.github.com> | 2024-09-23 16:40:39 +0800 |
|---|---|---|
| committer | nora <48135649+Noratrieb@users.noreply.github.com> | 2024-09-24 19:51:44 +0200 |
| commit | e1ff877fe4f569ca6a8e4d69506b3a67eafb8135 (patch) | |
| tree | f30661e1fe7cb1648c00a3a8aeecf1f6ab45992e /src/doc/rustc-dev-guide | |
| parent | 96805d6a853053268f67e6c4cd50fb93cef6b577 (diff) | |
| download | rust-e1ff877fe4f569ca6a8e4d69506b3a67eafb8135.tar.gz rust-e1ff877fe4f569ca6a8e4d69506b3a67eafb8135.zip | |
Describe `.git-blame-ignore-rev`
Diffstat (limited to 'src/doc/rustc-dev-guide')
| -rw-r--r-- | src/doc/rustc-dev-guide/src/git.md | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/doc/rustc-dev-guide/src/git.md b/src/doc/rustc-dev-guide/src/git.md index b716ccd44b6..90dbc3fb1b5 100644 --- a/src/doc/rustc-dev-guide/src/git.md +++ b/src/doc/rustc-dev-guide/src/git.md @@ -597,6 +597,19 @@ $ git submodule foreach git reset --hard and then try `git submodule update` again. +## Ignoring commits during `git blame` + +Some commits contain large reformatting changes that don't otherwise change functionality. They can +be instructed to be ignored by `git blame` through +[`.git-blame-ignore-revs`](https://github.com/rust-lang/rust/blob/master/.git-blame-ignore-revs): + +1. Configure `git blame` to use `.git-blame-ignore-revs` as the list of commits to ignore: `git + config blame.ignorerevsfile .git-blame-ignore-revs` +2. Add suitable commits that you wish to be ignored by `git blame`. + +Please include a comment for the commit that you add to `.git-blame-ignore-revs` so people can +easily figure out *why* a commit is ignored. + [Git submodules]: https://git-scm.com/book/en/v2/Git-Tools-Submodules [`rust-lang/llvm-project`]: https://github.com/rust-lang/llvm-project [llvm-update]: https://github.com/rust-lang/rust/pull/99464/files |
