Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pRF9Y-00041O-E2 for pgsql-hackers@arkaria.postgresql.org; Sun, 12 Feb 2023 16:24:36 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1pRF9X-0004D2-5d for pgsql-hackers@arkaria.postgresql.org; Sun, 12 Feb 2023 16:24:35 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pRF9W-0004Ct-SO for pgsql-hackers@lists.postgresql.org; Sun, 12 Feb 2023 16:24:34 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pRF9R-0006NZ-Fe for pgsql-hackers@postgresql.org; Sun, 12 Feb 2023 16:24:34 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 31CGOEna842820; Sun, 12 Feb 2023 11:24:14 -0500 From: Tom Lane To: Andrew Dunstan cc: Jelte Fennema , "shiy.fnst@fujitsu.com" , Robert Haas , Justin Pryzby , Andres Freund , Noah Misch , Peter Geoghegan , Bruce Momjian , Magnus Hagander , Alvaro Herrera , Stephen Frost , Jesse Zhang , "pgsql-hackers@postgresql.org" Subject: Re: run pgindent on a regular basis / scripted manner In-reply-to: <00885533-ff96-2a95-7911-329c873b3029@dunslane.net> References: <1923921.1675526879@sss.pgh.pa.us> <20230204171101.GF1653@telsasoft.com> <2009472.1675532231@sss.pgh.pa.us> <3d67bc80-4de2-5ba8-e272-e4ad2e59ba04@dunslane.net> <4ac8f263-f1bb-faa5-a307-1fffe00f0e3e@dunslane.net> <0f074818-b01a-799f-3c74-5fb5deab1d23@dunslane.net> <1d66447e-a77b-ca0d-90a0-782800e85383@dunslane.net> <390e7b04-11f3-f715-7a7d-d1a9077fbea8@dunslane.net> <00885533-! ff96-2a95-7911-329c873b3029@dunslane.net> Comments: In-reply-to Andrew Dunstan message dated "Sun, 12 Feb 2023 09:16:25 -0500" MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-ID: <842818.1676219054.1@sss.pgh.pa.us> Content-Transfer-Encoding: 8bit Date: Sun, 12 Feb 2023 11:24:14 -0500 Message-ID: <842819.1676219054@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Andrew Dunstan writes: > ... then you could do >     pgindent `git dirty` > The only danger would be if there were no dirty files. Maybe we need a > switch to inhibit using the current directory if there are no command > line files. It seems like "indent the whole tree" is about to become a minority use-case. Maybe instead of continuing to privilege that case, we should say that it's invoked by some new switch like --all-files, and without that only the stuff identified by command-line arguments gets processed. regards, tom lane