From: | Mark Dilger <hornschnorter(at)gmail(dot)com> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | Robert Haas <robertmhaas(at)gmail(dot)com>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: pgindent run? |
Date: | 2017-11-28 23:16:18 |
Message-ID: | 3203D017-3161-49B9-8EE4-2C43A2BD639F@gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
> On Nov 28, 2017, at 2:57 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>
> Mark Dilger <hornschnorter(at)gmail(dot)com> writes:
>>> On Nov 28, 2017, at 12:47 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>>> I think that'd be taking it too far, especially given that the dependency
>>> on a typedefs list means that the git hook might have a different idea
>>> of what's correctly indented than the committer does. It'd be very hard
>>> to debug such discrepancies and figure out what would satisfy the hook.
>
>> It sounds like it just requires that the committer also commit any changes
>> to the typedefs list, such that the indenter run by the git hook can use the
>> same list the committer is using. For many commits, the typedefs list won't
>> change, and the hook would just use the most recent one from the repository.
>
>> Barring any objections, I'll see if I can make that work on my local git repo
>> and post a patch if so.
>
> The other problem that would have to be considered is cross-branch
> variation in the indent rules. We've generally been in the habit of
> back-patching HEAD diffs without worrying about whether they meet
> back-branch rules; certainly nobody maintains typedefs.list in the
> back branches. Maybe the most expedient answer for that is to only
> enforce indentation in HEAD.
>
> I'm still not really on board with this though. I can definitely
> see the day coming when it would block a security patch and somebody
> would be scrambling desperately to fix their indentation under time
> pressure, even though perhaps the patch had been fine when created.
Ok, I'll consider the idea dead. I don't see any solution to that.
mark
From | Date | Subject | |
---|---|---|---|
Next Message | Stephen Frost | 2017-11-28 23:26:38 | Re: [HACKERS] postgres_fdw super user checks |
Previous Message | Tom Lane | 2017-11-28 23:12:11 | Re: [HACKERS] postgres_fdw: Add support for INSERT OVERRIDING clause |