pgindent: filter files for the --commit option
authorAndrew Dunstan <andrew@dunslane.net>
Sun, 12 Feb 2023 13:43:44 +0000 (08:43 -0500)
committerAndrew Dunstan <andrew@dunslane.net>
Sun, 12 Feb 2023 13:51:01 +0000 (08:51 -0500)
commitdab07e8c6896df3129bc153ead1f107e695652ee
tree4e6d2e0cd8465908c8d17dc530a038f1ab12f996
parent10a082bf72150f49c34fcf152565c77d80f31a9c
pgindent: filter files for the --commit option

per gripe from Shi Yu, solution from Jelte Fennema

Also add a check that the file exists, and issue a warning if it
doesn't.

As an efficiency measure, avoid processing any file more than once.

Discussion: https://postgr.es/m/TYAPR01MB6315B86619944D4A6B56842DFDDE9@TYAPR01MB6315.jpnprd01.prod.outlook.com
src/tools/pgindent/pgindent