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 1pqJvP-0000uB-Rk for pgsql-hackers@arkaria.postgresql.org; Sat, 22 Apr 2023 20:33:39 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1pqJvN-0004L4-Hn for pgsql-hackers@arkaria.postgresql.org; Sat, 22 Apr 2023 20:33:37 +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 1pqJvN-0004Ku-7y for pgsql-hackers@lists.postgresql.org; Sat, 22 Apr 2023 20:33:37 +0000 Received: from mail-yb1-xb30.google.com ([2607:f8b0:4864:20::b30]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1pqJvG-004UNQ-H9 for pgsql-hackers@postgresql.org; Sat, 22 Apr 2023 20:33:36 +0000 Received: by mail-yb1-xb30.google.com with SMTP id 3f1490d57ef6-b9554ad3721so4283647276.0 for ; Sat, 22 Apr 2023 13:33:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=leadboat.com; s=google; t=1682195608; x=1684787608; h=user-agent:in-reply-to:content-disposition:mime-version:references :message-id:subject:cc:to:from:date:from:to:cc:subject:date :message-id:reply-to; bh=m7lvZCaWggeE1Lr0/4NgIS+2itQXW66P7e8bDPlC6H8=; b=AOH5ktfM89ckrV6IKNruyFDFMKCKjxCw8zYvWerrcPU3Doj6498VvM3VildNjYlRiV ncS9s18hp+apH/8b1sVzIJvJBuXB4MmK+TeoCsPtgma20Iob8kvpcR3VG3TwxeybXMEm NSMdNIEWBpYfUN8kqsO4emErbe2tNqgBERx8Q= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1682195608; x=1684787608; h=user-agent:in-reply-to: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=m7lvZCaWggeE1Lr0/4NgIS+2itQXW66P7e8bDPlC6H8=; b=UKhRwLP/czOIGTyPCpD6KEZiXQTiBEVFGLVQmQkqMEDdz95pw4kDmTZnNJuQt7fxqa e2w2ApfzZBF0UbqGhsxS/KAWR5T0QC8a+fYyL140HrNZoDl0clAZokZYig1o9EKlz1j6 SlGL4xcPdnmRYrboknyiGJkdNkF/UeGlqqUcmjXyfN1LLguNsfYNjo+aZrumrLMXcPmH NtatuNyHFjBmZG1/XNVacfZbcVezMkXkL7L745CdHseDyndVHuhip1E9Ep85rmJboIhU OjrZl0HO/hXThg7mWF9nV1N4QVbTHSjBUe8kul6GHkB/D+cR4EbKQkxyMsm3JUUEWDYv +Mtw== X-Gm-Message-State: AAQBX9fn7OfNX6TSKupqExgM/kFsHPfVP0aGXGytII3dmOLnLyA32gNl sEj1qZzX1fhUh/Yx+4Sb6wYGNQ== X-Google-Smtp-Source: AKy350akdogTsiPN52IoQN9kGq/010JLmuCRvBdHnoYH+k54U6vVHSiJvYqRbxhBsvlmZ4ZuvO2/Kg== X-Received: by 2002:a25:ccd6:0:b0:b95:72cf:8c80 with SMTP id l205-20020a25ccd6000000b00b9572cf8c80mr6802846ybf.51.1682195608507; Sat, 22 Apr 2023 13:33:28 -0700 (PDT) Received: from rfd.leadboat.com ([2600:1702:a20:5750::2e]) by smtp.gmail.com with ESMTPSA id j12-20020a056902020c00b00b8c09fd88ffsm1833674ybs.30.2023.04.22.13.33.27 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 22 Apr 2023 13:33:28 -0700 (PDT) Date: Sat, 22 Apr 2023 13:33:25 -0700 From: Noah Misch To: Tom Lane Cc: Magnus Hagander , Peter Eisentraut , Andres Freund , Bruce Momjian , Jelte Fennema , Peter Geoghegan , Alvaro Herrera , Stephen Frost , Jesse Zhang , PostgreSQL-development Subject: Re: run pgindent on a regular basis / scripted manner Message-ID: <20230422203325.GC1708514@rfd.leadboat.com> References: <20230202062838.GA1832088@rfd.leadboat.com> <1477791.1675320029@sss.pgh.pa.us> <764a8f96-58c3-361d-428f-7ef827d62023@enterprisedb.com> <20230206212157.axnz62oagvycvcjm@awork3.anarazel.de> <2828975.1675719367@sss.pgh.pa.us> <20230207044324.GB2017197@rfd.leadboat.com> <20230422195906.GB1708514@rfd.leadboat.com> <3713260.1682194523@sss.pgh.pa.us> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <3713260.1682194523@sss.pgh.pa.us> User-Agent: Mutt/1.5.24 (2015-08-30) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Sat, Apr 22, 2023 at 04:15:23PM -0400, Tom Lane wrote: > Noah Misch writes: > > - skip if the break-glass "pgindent: no" appears in a commit message > > There are two things that bother me about putting this functionality > into a server hook, beyond the possible speed issue: > > * The risk of failure. I don't have a terribly difficult time imagining > situations where things get sufficiently wedged that the server accepts > *no* commits, not even ones fixing the problem. An override such as > you suggest here could assuage that fear, perhaps. I agree that deserves some worry. > * The lack of user-friendliness. AFAIK, if a pre-receive hook fails > you learn little except that it failed. That is incorrect. The client gets whatever the hook prints. I'd probably make it print the first 10000 lines of the diff. I'm okay with a buildfarm animal. It's going to result in a more-cluttered git history as people push things, break that animal, and push followup fixes. While that's sad, I expect the level of clutter will go down pretty quickly and will soon be no worse than we already get from typo-fix pushes.