[PATCH] add .git-blame-ignore-revs
dana <[email protected]> Thu, 18 Jun 2026 23:20:40 +0000
| Newsgroups | gmane.comp.shells.zsh.devel |
|---|---|
| Message-ID | <[email protected]> |
white-space and typo fixes can affect the usability of git blame. i feel like sometimes people avoid fixing obvious formatting problems because they're worried about this since git 2.23 you can tell blame to ignore these noisy commits using --ignore-revs-file / blame.ignoreRevsFile. all major forges activate this functionality automatically when blaming in the web ui if the file .git-blame-ignore-revs exists. for example this is github's documentation on it: https://docs.github.com/en/repositories/working-with-files/using-files/viewing-and-understanding-files#ignore-commits-in-the-blame-view here's a file like that for zsh. i've pre-populated it with some previous white-space commits, but i didn't look super hard for them. i'm mostly posting this to advertise its availability for future changes. i'd like to eventually use it to fix some white-space issues that've been bothering me. but more immediately maybe we'd want it for w/54806 dana diff --git a/.git-blame-ignore-revs b/.git-blame-ignore-revs new file mode 100644 index 000000000..820c77fa0 --- /dev/null +++ b/.git-blame-ignore-revs @@ -0,0 +1,26 @@ +# commits to be ignored by git blame. use as follows: +# +# git config blame.ignoreRevsFile .git-blame-ignore-revs +# +# .git-blame-ignore-revs is the conventional file name for this purpose, so you +# may prefer to use it globally instead. this is possible in git 2.53+: +# +# git config --global blame.ignoreRevsFile ':(optional).git-blame-ignore-revs' +# +# in general, only trivial, non-functionality-affecting commits (e.g. typo and +# white-space fixes) should be added to this list +# +# please add in ascending chronological order + +# unposted: Fix inconsistent white space in change log +92b0e885d6273315602668eb50f25310020fee13 +# unposted: fix indentation (whitespace-only change) +6c6200520afa0409c5c310cd421f33353c44c61d +# 45101: Adjust white space +1a8c69e26fc7e64e1b5e2837d7754a910b6a0c26 +# Clean up error-message white space +4ce66857b71b40a0661df3780ff557f2b0f4cb13 +# 46139: _git: Remove hanging whitespaces +d839833e4e00ee320a353846eaa235ab952181f0 +# 49435: Remove trailing whitespaces in expn.yo +02f75cf38699b99340c1d2c8f5a9d9aaf81432e7