Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 95203e0

Browse files
committed
Modify copyright.pl so all lines are processed, not just the first
match, so files that contain embedded copyrights are updated, e.g. pgsql/help.c. Backpatch to 9.2.
1 parent 5198ae8 commit 95203e0

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

src/tools/copyright.pl

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -48,12 +48,10 @@ sub wanted
4848
# We only care about lines with a copyright notice.
4949
next unless $line =~ m/$cc.*$pgdg/;
5050

51-
# We stop when we've done one substitution. This is both for
52-
# efficiency and, at least in the case of this program, for
53-
# correctness.
54-
last if $line =~ m/$cc.*$year.*$pgdg/;
55-
last if $line =~ s/($cc\d{4})(, $pgdg)/$1-$year$2/;
56-
last if $line =~ s/($cc\d{4})-\d{4}(, $pgdg)/$1-$year$2/;
51+
# We process all lines because some files have copyright
52+
# strings embedded in them, e.g. src/bin/psql/help.c
53+
$line =~ s/($cc\d{4})(, $pgdg)/$1-$year$2/;
54+
$line =~ s/($cc\d{4})-\d{4}(, $pgdg)/$1-$year$2/;
5755
}
5856
untie @lines;
5957
}

0 commit comments

Comments
 (0)