On Jan 9, 2008 10:27 PM, bruno randolf <[EMAIL PROTECTED]> wrote:
> hi!
>
> manually maintaining the Changes-licensed-under tags for every commit is
> boring, so i created the following script which you can paste
> into .git/hooks/commit-msg (don't forget to make it executable too) to
> automatically add a Changes-licensed-under tag with the same license as the
> touched files:

This was really cool, thanks! I've added my own, which is a bit
different than yours, produces results as those from my latest
patches. You can find the script here:

http://kernel.org/pub/linux/kernel/people/mcgrof/scripts/ath5k-license.pl

To install using git, do:

       chmod o+x .git/hooks/commit-msg

Its recommended your SOB line go below your Changes-licensed-under tag
(per Linville's preference as he adds his SOB below).

Your commit-msg script can look like this, for example:

git-diff-index --name-only HEAD | $HOME/bin/ath5k-license.pl >> "$1"

# Uncomment the below to add a Signed-off-by line to the message.
SOB=$(git var GIT_AUTHOR_IDENT | sed -n 's/^\(.*>\).*$/Signed-off-by: \1/p')
grep -qs "^$SOB" "$1" || echo "$SOB" >> "$1"

# This example catches duplicate Signed-off-by lines.
test "" = "$(grep '^Signed-off-by: ' "$1" |
         sort | uniq -c | sed -e '/^[   ]*1[    ]/d')" || {
                 echo >&2 Duplicate Signed-off-by lines.
                         exit 1
                         }

  Luis
_______________________________________________
ath5k-devel mailing list
ath5k-devel@lists.ath5k.org
https://lists.ath5k.org/mailman/listinfo/ath5k-devel

Reply via email to