Re: Why --backup-and-modify-in-place in perltidy config?

From: Andrew Dunstan <andrew(at)dunslane(dot)net>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-hackers(at)postgreSQL(dot)org
Subject: Re: Why --backup-and-modify-in-place in perltidy config?
Date: 2016-08-15 14:12:32
Message-ID: 57B1CDD0.3060401@dunslane.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 08/14/2016 04:38 PM, Tom Lane wrote:
> I did a trial run following the current pgindent README procedure, and
> noticed that the perltidy step left me with a pile of '.bak' files
> littering the entire tree. This seems like a pretty bad idea because
> a naive "git add ." would have committed them. It's evidently because
> src/tools/pgindent/perltidyrc includes --backup-and-modify-in-place.
> Is there a good reason for that, and if so what is it?

We should probably specify -bext='/', which would cause the backup files
to be deleted unless an error occurred.

Alternatively, we could just remove the in-place parameter and write a
command that moved the new .tdy files over the original when perltidy
was finished.

>
> Also, is there a reason why the perltidy invocation command hasn't
> been packaged into a shell script, rather than expecting the committer
> to copy-and-paste a rather large string?

No idea. Sounds like a good thing to do.

cheers

andrew

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2016-08-15 14:19:12 Re: Why --backup-and-modify-in-place in perltidy config?
Previous Message Shay Rojansky 2016-08-15 13:57:47 Re: Slowness of extended protocol