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

From Andrew Dunstan
Subject Re: run pgindent on a regular basis / scripted manner
Date
Msg-id f5d803a3-fd0d-0826-250e-350d9f9c3ff0@dunslane.net
Whole thread Raw
In response to Re: run pgindent on a regular basis / scripted manner  (Robert Haas <robertmhaas@gmail.com>)
Responses Re: run pgindent on a regular basis / scripted manner
List pgsql-hackers


On 2023-02-06 Mo 09:40, Robert Haas wrote:
2. I'd like an easy way to indent the unstaged files in the current
directory (e.g. pgindent --dirty) or the files that have been queued
up for commit (e.g. pgindent --cached).


My git-fu is probably not all that it should be. I think we could possibly get at this list of files by running

  git status --porcelain --untracked-files=no --ignored=no -- .

And then your --dirty list would be lines beginning with ' M' while your --cached list would be lines beginning with 'A[ M]'

Does that seem plausible?


cheers


andrew

--
Andrew Dunstan
EDB: https://www.enterprisedb.com

pgsql-hackers by date:

Previous
From: torikoshia
Date:
Subject: Allow auto_explain to log plan duration and buffer usage
Next
From: Andrew Dunstan
Date:
Subject: Re: run pgindent on a regular basis / scripted manner