grub-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Copyright lines not being updated!


From: Felix Zielcke
Subject: Re: Copyright lines not being updated!
Date: Wed, 03 Jun 2009 18:07:20 +0200

Am Montag, den 04.05.2009, 22:31 +0200 schrieb Robert Millan:
> On Tue, May 05, 2009 at 03:44:27AM +0800, Bean wrote:
> > Hi,
> > 
> > git users can add this at the beginning of .git/hooks/pre-commit to
> > run the copyright update test before committing:
> > 
> > L1=`git diff --cached --stat 2>/dev/null | gawk '{ if (($2 == "|") &&
> > ($3 > 5)) print $1}'`
> > L2=`grep -lie "Copyright (C).*\(199[0-9]\|200[^9]\) *Free" $L1 2>/dev/null`
> > 
> > if test ! -z $L2 ; then
> >     echo You should update copyright information for the following files:
> >     git diff --cached --stat $L2 2>/dev/null
> >     exit 1
> > fi
> 
> Note that copyright lines don't _always_ have to be updated.  It's
> detrimental to do it when there's no need (bogus copyright assertions
> weaken the legitimate ones).

Well actually the FSF recommendes in the GNU maintainer docs [0] to
update it at the beginning of a year for all files and then be done with
it
By the way I just noticed that emacs has a feaure to update it
automatically on save.
With the GTK version it's at Options -> Customize Emacs -> Top-level
customization group
and then Files -> Before Save Hook -> copyright-update

[0] http://www.gnu.org/prep/maintain/maintain.html#Copyright-Notices
"To update the list of year numbers, add each year in which you have
made nontrivial changes to the package. (Here we assume you're using a
publicly accessible revision control server, so that every revision
installed is also immediately and automatically published.) When you add
the new year, it is not required to keep track of which files have seen
significant changes in the new year and which have not. It is
recommended and simpler to add the new year to all files in the package,
and be done with it for the rest of the year."
-- 
Felix Zielcke





reply via email to

[Prev in Thread] Current Thread [Next in Thread]