| From: | Andrew Dunstan <andrew(at)dunslane(dot)net> |
|---|---|
| To: | Jelte Fennema <postgres(at)jeltef(dot)nl>, Robert Haas <robertmhaas(at)gmail(dot)com> |
| Cc: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Justin Pryzby <pryzby(at)telsasoft(dot)com>, Andres Freund <andres(at)anarazel(dot)de>, Noah Misch <noah(at)leadboat(dot)com>, Peter Geoghegan <pg(at)bowt(dot)ie>, Bruce Momjian <bruce(at)momjian(dot)us>, Magnus Hagander <magnus(at)hagander(dot)net>, Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>, Stephen Frost <sfrost(at)snowman(dot)net>, Jesse Zhang <sbjesse(at)gmail(dot)com>, pgsql-hackers(at)postgresql(dot)org |
| Subject: | Re: run pgindent on a regular basis / scripted manner |
| Date: | 2023-02-10 14:26:50 |
| Message-ID: | db548115-7af5-1c9e-ec9e-d8787771be7c@dunslane.net |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
On 2023-02-07 Tu 11:32, Jelte Fennema wrote:
> On Tue, 7 Feb 2023 at 17:11, Robert Haas<robertmhaas(at)gmail(dot)com> wrote:
>> I don't know if that works or not, but it does seem plausible, at
>> least. My idea would have been to use the --name-status option, which
>> works for both git diff and git show. You just look and see which
>> lines in the output start with M or A and then take the file names
>> from those lines.
> If you add `--diff-filter=ACMR`, then git diff/show will only show
> Added, Copied, Modified, and Renamed files.
>
> The pre-commit hook that Andrew added to the wiki uses that in
> combination with --name-only to get the list of files that you want to
> check on commit:
> https://wiki.postgresql.org/wiki/Working_with_Git#Using_git_hooks
OK, here's a patch based on Robert's and Jelte's ideas.
cheers
andrew
--
Andrew Dunstan
EDB:https://www.enterprisedb.com
| Attachment | Content-Type | Size |
|---|---|---|
| pgindent-dirty-cached.patch | text/x-patch | 2.2 KB |
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Robert Haas | 2023-02-10 14:43:57 | Re: ICU locale validation / canonicalization |
| Previous Message | Robert Haas | 2023-02-10 14:23:35 | Re: pgsql: pgstat: Track more detailed relation IO statistics |