projects
/
postgresql.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
95203e0
)
Have copyright.pl skip updating something that is just the current year,
author
Bruce Momjian
<bruce@momjian.us>
Fri, 6 Jul 2012 16:21:43 +0000
(12:21 -0400)
committer
Bruce Momjian
<bruce@momjian.us>
Fri, 6 Jul 2012 16:21:43 +0000
(12:21 -0400)
to avoid producing dups, e.g. 2012-2012
Backpatch to 9.2.
src/tools/copyright.pl
patch
|
blob
|
blame
|
history
diff --git
a/src/tools/copyright.pl
b/src/tools/copyright.pl
index 5911586b8e4f03bff8a9ba01a2671ca6b419f940..52a7cb16cc69a29d0b355758d1dbeb775c61f231 100755
(executable)
--- 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/;