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 1pRJRr-0008PR-FN for pgsql-hackers@arkaria.postgresql.org; Sun, 12 Feb 2023 20:59:47 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1pRJRq-0007HG-A8 for pgsql-hackers@arkaria.postgresql.org; Sun, 12 Feb 2023 20:59:46 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pRJRp-0007H7-RM for pgsql-hackers@lists.postgresql.org; Sun, 12 Feb 2023 20:59:46 +0000 Received: from mail-il1-x12b.google.com ([2607:f8b0:4864:20::12b]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1pRJRi-0001RR-LR for pgsql-hackers@postgresql.org; Sun, 12 Feb 2023 20:59:44 +0000 Received: by mail-il1-x12b.google.com with SMTP id v15so4488299ilc.10 for ; Sun, 12 Feb 2023 12:59:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telsasoft-com.20210112.gappssmtp.com; s=20210112; h=user-agent:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=PdczWJCSEXtyej1B8XUJW8agGCkTiE4eEITHlFyX7SQ=; b=UZshUM+36eykFG+GVEeAJWKcH7UcaaaNWq/r6TymVn+HR+3RPOjol/TdwjDyxKc8ZT 9WsglUm5sKdusjXLXm1ohxHkrsWe/jDDPrqtKmavtzd53MbWsAxlhWiBj9IINN9whGcT 82bP8McF0dQtcIzJm35rSeAjRhxvBYHDNyV3Fe5Yf/xiSls4aJ3Q3GebJZvYUe0gvyAD E7HkQqTDYqPf5Wi9x6Uiwsh08oYqVPWEYr7x2T6PO4pRVnX2/kYUa6mbb0wR7SP3dhly 79VGosLybSEpepWsV5NA/4UaL8/jlq8pkRl/oP6YU7i9F0b3V+f1u7PDN3tlvYUWg5dM cnpQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=user-agent:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=PdczWJCSEXtyej1B8XUJW8agGCkTiE4eEITHlFyX7SQ=; b=agQDCh4tAt0f4x4hbquk0aWYdj7W9mzc+at+XCpgdUR29vWZW2Q31PMnYZ5pynjPvg tFlXGPU/rBV6e3XcegVst/0KBDb/akw4+hJMvY+u/G2iY5MisAWSq8fwayFQaD/WCAAt I43swTJtCc6FvRUhh76hXkQywWdqFdSZ2P0fB1lbK8mChTdavrBzycYQZcw2YG7veW2M 48gpJakQoofjn0M7RV/nfs8/5VlEfc6Lxqc3/FT66ZxRQjtiVVaaXL5wvwo5t/1oPPm9 l2dLgEUs/8MbFMj9WWXOUfBk0kNtIEfTpqganO8Iv15+gxs8eyD8tPudHc1eIu7Dtb49 aP4g== X-Gm-Message-State: AO0yUKViOFpyEBSQ7sZ0n9dFe1EP+P6l83CA5GyoTd5JQb4g1Y/hG8P8 A/w/viEm+sWzlpfTrDkjHE5kkw== X-Google-Smtp-Source: AK7set+/rKYNbYLgKXxuSkWK4Ai3I4u36FGWq2PcWc6+ny5zMHIYLcAtxppc8QhYmtPoRYKl23xSjw== X-Received: by 2002:a92:cd89:0:b0:310:b84b:c884 with SMTP id r9-20020a92cd89000000b00310b84bc884mr25581305ilb.18.1676235577854; Sun, 12 Feb 2023 12:59:37 -0800 (PST) Received: from pryzbyj.telsasoft (charmander.telsasoft.com. [50.244.222.1]) by smtp.gmail.com with ESMTPSA id q8-20020a056e02078800b00310f9a0f8a7sm3220407ils.76.2023.02.12.12.59.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 12 Feb 2023 12:59:37 -0800 (PST) Received: by pryzbyj.telsasoft (Postfix, from userid 1000) id 95ADC800530; Sun, 12 Feb 2023 14:59:36 -0600 (CST) Date: Sun, 12 Feb 2023 14:59:36 -0600 From: Justin Pryzby To: Tom Lane Cc: Andrew Dunstan , Jelte Fennema , shiy.fnst@fujitsu.com, Robert Haas , 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 Message-ID: <20230212205936.GV1653@telsasoft.com> References: <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> <842819.1676219054@sss.pgh.pa.us> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <842819.1676219054@sss.pgh.pa.us> User-Agent: Mutt/1.9.4 (2018-02-28) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Sun, Feb 12, 2023 at 11:24:14AM -0500, Tom Lane wrote: > 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. It seems like if pgindent knows about git, it ought to process only tracked files. Then, it wouldn't need to manually exclude generated files, and it wouldn't process vpath builds and who-knows-what else it finds in CWD. At least --commit doesn't seem to work when run outside of the root source dir. -- Justin