postgres.git / summary / log / commit / refs
commit d17c0135cdf6e478a29080f563da3d65cb441291
Author: Bruce Momjian <bruce@momjian.us>
Date: Fri Jul 06 16:21:43 2012 +0000
First released in: 9.3.0, 9.2.0
Have copyright.pl skip updating something that is just the current year,
to avoid producing dups, e.g. 2012-2012
Backpatch to 9.2.
src/tools/copyright.pl | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/src/tools/copyright.pl b/src/tools/copyright.pl
index 5911586b8e4..52a7cb16cc6 100755
--- a/src/tools/copyright.pl
+++ b/src/tools/copyright.pl
@@ -48,6 +48,10 @@ sub wanted
# We only care about lines with a copyright notice.
next unless $line =~ m/$cc.*$pgdg/;
+ # Skip line if already matches the current year; if not
+ # we get $year-$year, e.g. 2012-2012
+ next if $line =~ m/$cc$year, $pgdg/;
+
# We process all lines because some files have copyright
# strings embedded in them, e.g. src/bin/psql/help.c
$line =~ s/($cc\d{4})(, $pgdg)/$1-$year$2/;
[parent: 95203e083366]