Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1vayWb-00GlEq-1o for pgsql-hackers@arkaria.postgresql.org; Wed, 31 Dec 2025 15:54:14 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1vayWa-006nFT-1q for pgsql-hackers@arkaria.postgresql.org; Wed, 31 Dec 2025 15:54:13 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1vayWa-006nFI-0p for pgsql-hackers@lists.postgresql.org; Wed, 31 Dec 2025 15:54:13 +0000 Received: from sss.pgh.pa.us ([68.162.161.243]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1vayWY-003nJ2-2O for pgsql-hackers@lists.postgresql.org; Wed, 31 Dec 2025 15:54:12 +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 5BVFs6Yk3915956; Wed, 31 Dec 2025 10:54:06 -0500 From: Tom Lane To: Andrew Dunstan cc: Ashutosh Bapat , Jelte Fennema-Nio , PostgreSQL Hackers , Daniel Gustafsson Subject: Re: Add "format" target to make and ninja to run pgindent and pgperltidy In-reply-to: <5611b8aa-8496-4632-92b4-e096654850d1@dunslane.net> References: <3913298.1767194804@sss.pgh.pa.us> <5611b8aa-8496-4632-92b4-e096654850d1@dunslane.net> Comments: In-reply-to Andrew Dunstan message dated "Wed, 31 Dec 2025 10:48:00 -0500" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <3915954.1767196446.1@sss.pgh.pa.us> Date: Wed, 31 Dec 2025 10:54:06 -0500 Message-ID: <3915955.1767196446@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Andrew Dunstan writes: > On 2025-12-31 We 10:26 AM, Tom Lane wrote: >> On the substance of the patch: I wonder whether we could make things >> more reliable by using git metadata to figure out which .h and .c >> files to point pgindent at. > I guess what you're wanting is a test to see if the file is in git or a > generated file? That doesn't really arise for me as I always do vpath > builds, so generated files are always elsewhere. Right. But if we're trying to make this easy, we need to make the automation work for all three use-cases (in-tree makefiles, vpath makefiles, meson). I was just wondering if relying on git would simplify getting the same results in all three. regards, tom lane