Remove obsolete pgindent options --code-base and --build
authorAndrew Dunstan <[email protected]>
Mon, 13 Feb 2023 13:13:03 +0000 (08:13 -0500)
committerAndrew Dunstan <[email protected]>
Mon, 13 Feb 2023 13:24:54 +0000 (08:24 -0500)
commitb16259b3c1897cf90855a94e5cb126d6c75e3cf3
tree66d350730659499a55048bf2c67060e0f1d66852
parent9a312562314abcec91ae9cff3a4af37196c3886e
Remove obsolete pgindent options --code-base and --build

Now that we have the sources for pg_bsd_indent in our code base these
are redundant.

It is now required to provide a list of files or directories to pgindent,
either by using --commit or on the command line. The equivalent of
previously running pgindent with no parameters is now `pgindent .`

Some extra checks are also added. duplicate files in the file list are
skipped, and there is a warning if no files are specified.

If the --commit option is used, the script now chdir's to the source
root, as git always reports files relative to that. (Fixes a gripe from
Justin Pryzby)

Reviewed by Tom Lane

Discussion: https://postgr.es/m/842819.1676219054@sss.pgh.pa.us
src/tools/pgindent/pgindent
src/tools/pgindent/pgindent.man