pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Daniel Gustafsson <daniel@yesql.se>
Cc: Dagfinn Ilmari Mannsåker <ilmari@ilmari.org>
Cc: pgsql-hackers@lists.postgresql.org
Subject: Re: Duplicat-word typos in code comments
Date: Mon, 04 Oct 2021 15:54:00 -0400
Message-ID: <4006180.1633377240@sss.pgh.pa.us> (raw)
In-Reply-To: <64684EA9-3BDB-413E-B254-8EA8AE2EC6DF@yesql.se>
References: <87bl45t0co.fsf@wibble.ilmari.org>
	<73E4E56B-D996-4701-97ED-A66ED98B2873@yesql.se>
	<878rz8udbm.fsf@wibble.ilmari.org>
	<3978708.1633355813@sss.pgh.pa.us>
	<64684EA9-3BDB-413E-B254-8EA8AE2EC6DF@yesql.se>

Daniel Gustafsson <daniel@yesql.se> writes:
>> On 4 Oct 2021, at 15:56, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> I used to think it was better to go ahead and manually reflow, if you
>> use an editor that makes that easy.  That way there are fewer commits
>> touching any one line of code, which is good when trying to review
>> code history.  However, now that we've got the ability to make "git
>> blame" ignore pgindent commits, maybe it's better to leave that sort
>> of mechanical cleanup to pgindent, so that the substantive patch is
>> easier to review.

> Yeah, that's precisely why I did it.  Since we can skip over pgindent sweeps it
> makes sense to try and minimize such changes to make code archaeology easier.
> There are of course cases when the result will be such an eyesore that we'd
> prefer to have it done sooner, but in cases like these where line just got one
> word shorter it seemed an easy choice.

Actually though, there's another consideration: if you leave
not-correctly-pgindented code laying around, it causes problems
for the next hacker who modifies that file and wishes to neaten
up their own work by pgindenting it.  They can either tediously
reverse out part of the delta, or commit a patch that includes
entirely-unrelated cosmetic changes, neither of which is
pleasant.

			regards, tom lane





view thread (7+ messages)  latest in thread

Message-ID: <4006180.1633377240@sss.pgh.pa.us>
Permalink:  ../4006180.1633377240@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/4006180.1633377240@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-hackers@postgresql.org
  Cc: tgl@sss.pgh.pa.us, daniel@yesql.se, ilmari@ilmari.org
  Subject: Re: Duplicat-word typos in code comments
  In-Reply-To: <4006180.1633377240@sss.pgh.pa.us>
  References: <87bl45t0co.fsf@wibble.ilmari.org> <73E4E56B-D996-4701-97ED-A66ED98B2873@yesql.se> <878rz8udbm.fsf@wibble.ilmari.org> <3978708.1633355813@sss.pgh.pa.us> <64684EA9-3BDB-413E-B254-8EA8AE2EC6DF@yesql.se> <4006180.1633377240@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox