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). -- Robert Millan The DRM opt-in fallacy: "Your data belongs to us. We will decide when (and how) you may access your data; but nobody's threatening your freedom: we still allow you to remove your data and not access it at all." _______________________________________________ Grub-devel mailing list Grub-devel@gnu.org http://lists.gnu.org/mailman/listinfo/grub-devel