pgsql: Fix Perl copyright script to skip .git subdirectory; running it

Поиск
Список
Период
Сортировка
Искать

pgsql: Fix Perl copyright script to skip .git subdirectory; running it

От:
Bruce Momjian <bruce@momjian.us>
Дата:
Fix Perl copyright script to skip .git subdirectory;  running it on
those files corrupts the index.

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/9f60880207c6c7d00a2e4e4d904ef720de58f45b

Modified Files
--------------
src/tools/copyright.pl |    9 ++++++++-
1 files changed, 8 insertions(+), 1 deletions(-)

Re: pgsql: Fix Perl copyright script to skip .git subdirectory; running it

От:
Andrew Dunstan <andrew@dunslane.net>
Дата:


On 01/01/2012 05:59 PM, Bruce Momjian wrote:
> Fix Perl copyright script to skip .git subdirectory;  running it on
> those files corrupts the index.


This patch looks a bit dubious. Instead of:

    if ($File::Find::name =~ m{^\./\.git$})

I'd use:

    if ($_ eq '.git')

cheers

andrew


Re: pgsql: Fix Perl copyright script to skip .git subdirectory; running it

От:
Bruce Momjian <bruce@momjian.us>
Дата:
On Sun, Jan 01, 2012 at 07:05:24PM -0500, Andrew Dunstan wrote:
> 
> 
> On 01/01/2012 05:59 PM, Bruce Momjian wrote:
> >Fix Perl copyright script to skip .git subdirectory;  running it on
> >those files corrupts the index.
> 
> 
> This patch looks a bit dubious. Instead of:
> 
>    if ($File::Find::name =~ m{^\./\.git$})
> 
> I'd use:
> 
>    if ($_ eq '.git')

The question was whether we wanted to skip non-top-of-tree .git
directories.   I wasn't sure we wanted to do that.  Do we?

-- 
  Bruce Momjian          http://momjian.us
  EnterpriseDB                             http://enterprisedb.com

  + It's impossible for everything to be true. +

Re: pgsql: Fix Perl copyright script to skip .git subdirectory; running it

От:
Tom Lane <tgl@sss.pgh.pa.us>
Дата:
Bruce Momjian  writes:
> On Sun, Jan 01, 2012 at 07:05:24PM -0500, Andrew Dunstan wrote:
>> I'd use:
>> if ($_ eq '.git')

> The question was whether we wanted to skip non-top-of-tree .git
> directories.   I wasn't sure we wanted to do that.  Do we?

I'd think it'd be reasonable to do so.  It's not likely that this
script would be run from a point higher than the git root, but if
it were, you'd still need to skip the git index.

			regards, tom lane

Re: pgsql: Fix Perl copyright script to skip .git subdirectory; running it

От:
Bruce Momjian <bruce@momjian.us>
Дата:
On Sun, Jan 01, 2012 at 07:24:40PM -0500, Bruce Momjian wrote:
> On Sun, Jan 01, 2012 at 07:05:24PM -0500, Andrew Dunstan wrote:
> > 
> > 
> > On 01/01/2012 05:59 PM, Bruce Momjian wrote:
> > >Fix Perl copyright script to skip .git subdirectory;  running it on
> > >those files corrupts the index.
> > 
> > 
> > This patch looks a bit dubious. Instead of:
> > 
> >    if ($File::Find::name =~ m{^\./\.git$})
> > 
> > I'd use:
> > 
> >    if ($_ eq '.git')
> 
> The question was whether we wanted to skip non-top-of-tree .git
> directories.   I wasn't sure we wanted to do that.  Do we?

Thanks, done.

-- 
  Bruce Momjian          http://momjian.us
  EnterpriseDB                             http://enterprisedb.com

  + It's impossible for everything to be true. +

Re: pgsql: Fix Perl copyright script to skip .git subdirectory; running it

От:
Bruce Momjian <bruce@momjian.us>
Дата:
On Sun, Jan 01, 2012 at 07:41:46PM -0500, Tom Lane wrote:
> Bruce Momjian  writes:
> > On Sun, Jan 01, 2012 at 07:05:24PM -0500, Andrew Dunstan wrote:
> >> I'd use:
> >> if ($_ eq '.git')
> 
> > The question was whether we wanted to skip non-top-of-tree .git
> > directories.   I wasn't sure we wanted to do that.  Do we?
> 
> I'd think it'd be reasonable to do so.  It's not likely that this
> script would be run from a point higher than the git root, but if
> it were, you'd still need to skip the git index.

Thanks, done.

-- 
  Bruce Momjian          http://momjian.us
  EnterpriseDB                             http://enterprisedb.com

  + It's impossible for everything to be true. +
FAQ