Re: [PATCH] Incremental sort (was: PoC: Partial sort) - Mailing list pgsql-hackers

From Alvaro Herrera
Subject Re: [PATCH] Incremental sort (was: PoC: Partial sort)
Date
Msg-id 20200313194250.GA13008@alvherre.pgsql
Whole thread Raw
In response to Re: [PATCH] Incremental sort (was: PoC: Partial sort)  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: [PATCH] Incremental sort (was: PoC: Partial sort)
List pgsql-hackers
On 2020-Mar-13, Tom Lane wrote:

> Alvaro Herrera <alvherre@2ndquadrant.com> writes:
> > ... You can specify a filelist to pgindent, also.  What I do is super
> > low-tech: do a "git diff origin/master", copy the filelist, and then
> > ^V^E to paste that list into a command line to run pgindent (editing to
> > remove the change histogram and irrelevant files).  I should automate
> > this ...
> 
> Yeah.  I tend to keep copies of the files I'm specifically hacking on
> in a separate work directory, and then I re-indent just that directory.
> But that's far from ideal as well.  I wonder if it'd be worth teaching
> pgindent to have some option to indent only files that are already
> modified according to git?

A quick look at git-ls-files manpage suggests that this might work:

 src/tools/pgindent/pgindent $(git ls-files --modified -- *.[ch])

If it's that easy, maybe it's not worth messing with pgindent ...


Also, I wonder if it would be better to modify our policies so that we
update typedefs.list more frequently.  Some people include additions
with their commits, but it's far from SOP.

-- 
Álvaro Herrera                https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services



pgsql-hackers by date:

Previous
From: Andres Freund
Date:
Subject: Re: database stuck in __epoll_wait_nocancel(). Are infinite timeouts safe?
Next
From: Thomas Munro
Date:
Subject: Re: Re: Optimize crash recovery