On Tue, 17 Oct 2023 at 03:23, Peter Geoghegan <p...@bowt.ie> wrote: > My main objection to the new policy is that it's not quite clear what > process I should go through in order to be 100% confident that koel > won't start whining (short of waiting around for koel to whine). I > know how to run pgindent, of course, and haven't had any problems so > far...but it still seems quite haphazard. If we're going to make this > a hard rule, enforced on every commit, it should be dead easy to > comply with the rule.
I think *it is* dead easy to comply. If you run the following commands before committing/after rebasing, then koel should always be happy: src/tools/pgindent/pgindent src # works always but a bit slow src/tools/pgindent/pgindent $(git diff --name-only --diff-filter=ACMR) # much faster, but only works if you DID NOT change typedefs.list If you have specific cases where it does not work. Then I think we should talk about those/fix them. But looking at the last few commits in .git-blame-ignore-revs I only see examples of people simply not running pgindent before they commit. I guess it's easy to forget, but that's why the wiki contains a pre-commit hook[1] that you can use to remind yourself/run pgindent automatically. The only annoying thing is that it does not trigger when rebasing, but you can work around that by using rebase its -x flag[2]. [1]: https://wiki.postgresql.org/wiki/Working_with_Git#Using_git_hooks [2]: https://adamj.eu/tech/2022/11/07/pre-commit-run-hooks-rebase/