Re: run pgindent on a regular basis / scripted manner - Mailing list pgsql-hackers

From Noah Misch
Subject Re: run pgindent on a regular basis / scripted manner
Date
Msg-id 20230422203325.GC1708514@rfd.leadboat.com
Whole thread Raw
In response to Re: run pgindent on a regular basis / scripted manner  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
On Sat, Apr 22, 2023 at 04:15:23PM -0400, Tom Lane wrote:
> Noah Misch <noah@leadboat.com> writes:
> > - skip if the break-glass "pgindent: no" appears in a commit message
> 
> There are two things that bother me about putting this functionality
> into a server hook, beyond the possible speed issue:
> 
> * The risk of failure.  I don't have a terribly difficult time imagining
> situations where things get sufficiently wedged that the server accepts
> *no* commits, not even ones fixing the problem.  An override such as
> you suggest here could assuage that fear, perhaps.

I agree that deserves some worry.

> * The lack of user-friendliness.  AFAIK, if a pre-receive hook fails
> you learn little except that it failed.

That is incorrect.  The client gets whatever the hook prints.  I'd probably
make it print the first 10000 lines of the diff.


I'm okay with a buildfarm animal.  It's going to result in a more-cluttered
git history as people push things, break that animal, and push followup fixes.
While that's sad, I expect the level of clutter will go down pretty quickly
and will soon be no worse than we already get from typo-fix pushes.



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: run pgindent on a regular basis / scripted manner
Next
From: Andres Freund
Date:
Subject: Re: Should we remove vacuum_defer_cleanup_age?