Skip to content

Commit 9f60880

Browse files
committed
Fix Perl copyright script to skip .git subdirectory; running it on
those files corrupts the index.
1 parent 6423390 commit 9f60880

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

src/tools/copyright.pl

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
#################################################################
33
# copyright.pl -- update copyright notices throughout the source tree, idempotently.
44
#
5-
# Copyright (c) 2011, PostgreSQL Global Development Group
5+
# Copyright (c) 2011-2012, PostgreSQL Global Development Group
66
#
77
# src/tools/copyright.pl
88
#################################################################
@@ -23,6 +23,13 @@
2323
find({wanted => \&wanted, no_chdir => 1}, '.');
2424

2525
sub wanted {
26+
# prevent corruption of git indexes, ./.git
27+
if ($File::Find::name =~ m{^\./\.git$})
28+
{
29+
$File::Find::prune = 1;
30+
return;
31+
}
32+
2633
return if ! -f $File::Find::name || -l $File::Find::name;
2734

2835
my @lines;

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy