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 1pJjXU-0006z1-O1 for pgsql-hackers@arkaria.postgresql.org; Sun, 22 Jan 2023 23:14:16 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1pJjXS-0003ww-TN for pgsql-hackers@arkaria.postgresql.org; Sun, 22 Jan 2023 23:14:14 +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 1pJjXS-0003wn-KL for pgsql-hackers@lists.postgresql.org; Sun, 22 Jan 2023 23:14:14 +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 1pJjXP-0001k7-UJ for pgsql-hackers@postgresql.org; Sun, 22 Jan 2023 23:14:14 +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 30MNE3TF1492904; Sun, 22 Jan 2023 18:14:03 -0500 From: Tom Lane To: Jelte Fennema cc: Andres Freund , Peter Geoghegan , Bruce Momjian , Magnus Hagander , Alvaro Herrera , Stephen Frost , Noah Misch , Jesse Zhang , PostgreSQL-development Subject: Re: run pgindent on a regular basis / scripted manner In-reply-to: References: <20200814202651.GA31108@alvherre.pgsql> <1097305.1674334785@sss.pgh.pa.us> <20230121224312.qmwpagrebidr6hi7@awork3.anarazel.de> <20230122094957.x542ojaqgi4lalq4@awork3.anarazel.de> <1354312.1674415202@sss.pgh.pa.us> Comments: In-reply-to Jelte Fennema message dated "Sun, 22 Jan 2023 22:19:10 +0100" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <1492902.1674429243.1@sss.pgh.pa.us> Date: Sun, 22 Jan 2023 18:14:03 -0500 Message-ID: <1492903.1674429243@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Jelte Fennema writes: > Maybe I'm not understanding your issue correctly, but for such > a case you could push two commits at the same time. I don't know that much about git commit hooks, but do they really only check the final state of a series of commits? In any case, I'm still down on the idea of checking this in a commit hook because of the complexity and lack of transparency of such a check. If you think your commit is correctly indented, but the hook (running on somebody else's machine) disagrees, how are you going to debug that? I don't want to get into such a situation, especially since Murphy's law guarantees that it would mainly bite people under time pressure, like when pushing a security fix. regards, tom lane