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 1pSMn7-0000AL-6s for pgsql-hackers@arkaria.postgresql.org; Wed, 15 Feb 2023 18:46:05 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1pSMn6-0000mp-2p for pgsql-hackers@arkaria.postgresql.org; Wed, 15 Feb 2023 18:46:04 +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 1pSMn5-0000mg-N6 for pgsql-hackers@lists.postgresql.org; Wed, 15 Feb 2023 18:46:03 +0000 Received: from mail-il1-x132.google.com ([2607:f8b0:4864:20::132]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1pSMmz-0007rC-8j for pgsql-hackers@postgresql.org; Wed, 15 Feb 2023 18:46:03 +0000 Received: by mail-il1-x132.google.com with SMTP id i26so1466022ila.11 for ; Wed, 15 Feb 2023 10:45:56 -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-disposition:mime-version:references :message-id:subject:cc:to:from:date:from:to:cc:subject:date :message-id:reply-to; bh=cgBkgXsLiFVQ3CsrrM475ZXaQJuVZPGOPPlbe5OU4qU=; b=IDdnOKE9k249kIQryD3pRvTz4Rg0EXxl1NL7CfxPm3dp2P3S0YHxe2r6cBt7zr2HHK Q/b+PWFAOwF7Jm89IXf8Wr3VgWzVxBcO1s5Zalex5MxTT5KVJ7Dnwxb1e24xhKKJ5UEC ZoNDQ+wvfvmlKaY+6avINDjb1BTqdP/jLkLvVVVK/rGosgSCv/xeKR6TOhP/0DL6j32h 9igBs3b6DqdHTfR6aJfXqfWNsygfZdDNNx21tBp3FsKZO5EEvv0Gkx1H2htjlzIv9qKI z0QUAN6JiyZeJbE7RTrQKZeCRU3YzldYxg/PoD+/1Ew8yZAFCgWnS14Zum3eJGvZ/XDY K+LA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; 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=cgBkgXsLiFVQ3CsrrM475ZXaQJuVZPGOPPlbe5OU4qU=; b=x/aY0Ld9iKP1n3Q//OsYOVlVW+KAdFSeJ/nDhP4hmG266kmL0nSy7/3ieywaRHhaTh /NqiUPjnjgRBNhjvthHcYCz5xNGSrBbMp0g2rD3Gfhsfwdyx77BU9VLOcRxA3yqXu12e LKM/EiCs4m20f3OilxC/nwtylaoiy5p6cJ+WChK+kb4UgYMpcXLC/xzR1rH/f5gZPBR6 2cd4UsyMAd9GKle/R+oDaflJwQxjX3Nn4rsPwHuzbJNcuOzkCDupBQxBCY1KY05jzjfe 38J5OoW5KeFAQ00cpQ1suiPVUDLI3uP/i5Q/2k9xGaqKXPqcQSytiDTA/yR1SS7AwYUc xCqg== X-Gm-Message-State: AO0yUKXJAmC4p6N/I4fSpLls3o5/mCNdqEY6OXZCSwXGs+7JtVtzqQsy slPVz+yUPPw30SPKOddyiYX7Pw== X-Google-Smtp-Source: AK7set/J01LKWei6H4Bua7K9QSD+FNbK8L7Nr3MdfEywNNIbPuC085MjHUxqIgZTI1P5z/NZZfqnQA== X-Received: by 2002:a05:6e02:1a81:b0:313:df83:3bed with SMTP id k1-20020a056e021a8100b00313df833bedmr3224512ilv.26.1676486755468; Wed, 15 Feb 2023 10:45:55 -0800 (PST) Received: from pryzbyj.telsasoft (charmander.telsasoft.com. [50.244.222.1]) by smtp.gmail.com with ESMTPSA id l11-20020a056e0212eb00b00313b08feec7sm877061iln.42.2023.02.15.10.45.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 15 Feb 2023 10:45:54 -0800 (PST) Received: by pryzbyj.telsasoft (Postfix, from userid 1000) id 0CBBA80073C; Wed, 15 Feb 2023 12:45:52 -0600 (CST) Date: Wed, 15 Feb 2023 12:45:52 -0600 From: Justin Pryzby To: Andrew Dunstan Cc: Tom Lane , 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: <20230215184552.GS1653@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> <20230212205936.GV1653@telsasoft.com> <2701ad84-05c9-6381-1666-b874c3000d54@dunslane.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <2701ad84-05c9-6381-1666-b874c3000d54@dunslane.net> 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 Mon, Feb 13, 2023 at 07:57:25AM -0500, Andrew Dunstan wrote: > > On 2023-02-12 Su 15:59, Justin Pryzby wrote: > > 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. > > I don't really want restrict this to tracked files because it would mean you > can't pgindent files before you `git add` them. I think you'd allow indenting files which were either tracked *or* specified on the command line. Also, it makes a more sense to "add" the file before indenting it, to allow checking the output and remove unrelated changes. So that doesn't seem to me like a restriction of any significance. But I would never want to indent an untracked file unless I specified it. -- Justin