Re: pgindent run?

From: Mark Dilger <hornschnorter(at)gmail(dot)com>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: pgindent run?
Date: 2017-11-28 20:06:34
Message-ID: A1DE49D5-F474-40F7-BEC5-A3BA05F18355@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


> On Nov 28, 2017, at 11:51 AM, Robert Haas <robertmhaas(at)gmail(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Юрий Соколов 2017-11-28 20:30:53 Re: [HACKERS] Small improvement to compactify_tuples
Previous Message Brian Cloutier 2017-11-28 20:00:05 Re: Add PGDLLIMPORT lines to some variables