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

Lists: pgsql-committers
From: Bruce Momjian <bruce(at)momjian(dot)us>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Fix Perl copyright script to skip .git subdirectory; running it
Date: 2012-01-01 22:59:18
Message-ID: E1RhUN4-0001qG-KK@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-committers

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(-)


From: Andrew Dunstan <andrew(at)dunslane(dot)net>
To: Bruce Momjian <bruce(at)momjian(dot)us>
Cc: pgsql-committers(at)postgresql(dot)org
Subject: Re: pgsql: Fix Perl copyright script to skip .git subdirectory; running it
Date: 2012-01-02 00:05:24
Message-ID: 4F00F4C4.2000200@dunslane.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-committers

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


From: Bruce Momjian <bruce(at)momjian(dot)us>
To: Andrew Dunstan <andrew(at)dunslane(dot)net>
Cc: pgsql-committers(at)postgresql(dot)org
Subject: Re: pgsql: Fix Perl copyright script to skip .git subdirectory; running it
Date: 2012-01-02 00:24:40
Message-ID: 20120102002440.GA24093@momjian.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-committers

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 <bruce(at)momjian(dot)us> http://momjian.us
EnterpriseDB http://enterprisedb.com

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


From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Bruce Momjian <bruce(at)momjian(dot)us>
Cc: Andrew Dunstan <andrew(at)dunslane(dot)net>, pgsql-committers(at)postgresql(dot)org
Subject: Re: pgsql: Fix Perl copyright script to skip .git subdirectory; running it
Date: 2012-01-02 00:41:46
Message-ID: 8805.1325464906@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-committers

Bruce Momjian <bruce(at)momjian(dot)us> 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


From: Bruce Momjian <bruce(at)momjian(dot)us>
To: Andrew Dunstan <andrew(at)dunslane(dot)net>
Cc: pgsql-committers(at)postgresql(dot)org
Subject: Re: pgsql: Fix Perl copyright script to skip .git subdirectory; running it
Date: 2012-01-02 00:47:35
Message-ID: 20120102004735.GC24093@momjian.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-committers

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 <bruce(at)momjian(dot)us> http://momjian.us
EnterpriseDB http://enterprisedb.com

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


From: Bruce Momjian <bruce(at)momjian(dot)us>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Andrew Dunstan <andrew(at)dunslane(dot)net>, pgsql-committers(at)postgresql(dot)org
Subject: Re: pgsql: Fix Perl copyright script to skip .git subdirectory; running it
Date: 2012-01-02 00:47:57
Message-ID: 20120102004757.GD24093@momjian.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-committers

On Sun, Jan 01, 2012 at 07:41:46PM -0500, Tom Lane wrote:
> Bruce Momjian <bruce(at)momjian(dot)us> 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 <bruce(at)momjian(dot)us> http://momjian.us
EnterpriseDB http://enterprisedb.com

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