mirror of
https://git.postgresql.org/git/postgresql.git
synced 2025-01-06 15:24:56 +08:00
Fix copyright.pl to properly skip the .git directory by adding a
basename() qualification.
This commit is contained in:
parent
b9eb808bf2
commit
5198ae8992
@ -11,6 +11,7 @@ use strict;
|
|||||||
use warnings;
|
use warnings;
|
||||||
|
|
||||||
use File::Find;
|
use File::Find;
|
||||||
|
use File::Basename;
|
||||||
use Tie::File;
|
use Tie::File;
|
||||||
|
|
||||||
my $pgdg = 'PostgreSQL Global Development Group';
|
my $pgdg = 'PostgreSQL Global Development Group';
|
||||||
@ -25,15 +26,14 @@ find({ wanted => \&wanted, no_chdir => 1 }, '.');
|
|||||||
|
|
||||||
sub wanted
|
sub wanted
|
||||||
{
|
{
|
||||||
|
|
||||||
# prevent corruption of git indexes by ignoring any .git/
|
# prevent corruption of git indexes by ignoring any .git/
|
||||||
if ($_ eq '.git')
|
if (basename($_) eq '.git')
|
||||||
{
|
{
|
||||||
$File::Find::prune = 1;
|
$File::Find::prune = 1;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
return if !-f $File::Find::name || -l $File::Find::name;
|
return if ! -f $File::Find::name || -l $File::Find::name;
|
||||||
|
|
||||||
# skip file names with binary extensions
|
# skip file names with binary extensions
|
||||||
# How are these updated? bjm 2012-01-02
|
# How are these updated? bjm 2012-01-02
|
||||||
|
Loading…
Reference in New Issue
Block a user