> On Nov 28, 2017, at 11:51 AM, Robert Haas <robertmhaas@gmail.com> wrote:
>
> If nobody minds too much, I'd like to update typedefs.list and
> pgindent the whole tree again. We've generally done a pretty good job
> with pgindenting patches as they are committed this cycle, but we're
> starting to accumulate things here and there that are not indented
> according to what pgindent likes -- and that makes it harder to keep
> later patches indented properly. You can reindent the files they
> touch, but then you have to strip back out the changes that are
> unrelated to the patch you're working on. There are only four source
> files where more than a dozen lines will be touched, so I don't think
> this will inconvenience anyone too much:
>
> src/backend/access/transam/xlog.c | 14 +++---
> src/backend/tcop/postgres.c | 18 +++----
> src/backend/optimizer/util/relnode.c | 34 +++++++-------
> src/backend/catalog/partition.c | 39 ++++++++--------
> src/backend/utils/mmgr/generation.c | 62 ++++++++++++-------------
>
> And the changes to typedefs.list would be, as of now, like this:
>
> src/tools/pgindent/typedefs.list | 53 ++++++++++++++-------
>
> Obviously, one of my motivations here is that I keep ending up
> commiting patches to partition.c to fix bugs and add features, and the
> fact I've missed that a few times is now coming back to haunt me.
I have no objection, but if the community intends to keep everything
indented per project standards, why is there no git hook to reject
improperly indented code at commit time? I've suffered some pain
trying to merge code pre-global-indent-run into a branch
post-global-indent-run and would rather this not keep happening.
Sorry if this has been debated before. A quick search did not turn up
any previous conversation, but that doesn't mean it has never been
discussed.
mark