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: Bean
Subject: Re: Copyright lines not being updated!
Date: Tue, 5 May 2009 03:44:27 +0800

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

On Tue, May 5, 2009 at 3:15 AM, Bean <address@hidden> wrote:
> Hi,
>
> This new script list more information, it helps to decide whether it
> need update.
>
> L1=`git diff --stat @{2009-01-01}..HEAD 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`
>
> git diff --stat @{2009-01-01}..HEAD $L2 2>/dev/null
>
> result:
>  Makefile.in                              |   48 +-
>  bus/usb/ohci.c                           |  609 ++
>  bus/usb/uhci.c                           |  676 +++
>  bus/usb/usb.c                            |  263 +
>  bus/usb/usbhub.c                         |  193 +
>  bus/usb/usbtrans.c                       |  212 +
>  commands/blocklist.c                     |   14 +-
>  commands/cat.c                           |   12 +-
>  commands/cmp.c                           |   12 +-
>  commands/crc.c                           |   14 +-
>  commands/date.c                          |   19 +-
>  commands/echo.c                          |   16 +-
>  commands/halt.c                          |   13 +-
>  commands/help.c                          |   60 +-
>  commands/hexdump.c                       |   19 +-
>  commands/i386/cpuid.c                    |   19 +-
>  commands/i386/pc/halt.c                  |   17 +-
>  commands/i386/pc/play.c                  |   12 +-
>  commands/i386/pc/pxecmd.c                |   17 +-
>  commands/i386/pc/vbeinfo.c               |   24 +-
>  commands/i386/pc/vbetest.c               |   15 +-
>  commands/ieee1275/suspend.c              |   11 +-
>  commands/ls.c                            |   64 +-
>  commands/lsmmap.c                        |   17 +-
>  commands/read.c                          |   13 +-
>  commands/reboot.c                        |   11 +-
>  commands/search.c                        |   32 +-
>  commands/sleep.c                         |   14 +-
>  commands/test.c                          |  420 ++-
>  commands/usbtest.c                       |  162 +
>  configure                                | 9612 
> ------------------------------
>  disk/fs_uuid.c                           |   26 +-
>  disk/ieee1275/nand.c                     |   17 +-
>  disk/ieee1275/ofdisk.c                   |  102 +-
>  disk/loopback.c                          |   18 +-
>  disk/lvm.c                               |    9 +-
>  disk/raid.c                              |   15 +-
>  disk/scsi.c                              |   46 +-
>  disk/usbms.c                             |  393 ++
>  fs/affs.c                                |   14 +-
>  fs/afs.c                                 |   14 +-
>  fs/cpio.c                                |   56 +-
>  fs/ext2.c                                |  123 +-
>  fs/hfs.c                                 |  265 +-
>  fs/hfsplus.c                             |   63 +-
>  fs/i386/pc/pxe.c                         |   10 +-
>  fs/iso9660.c                             |   16 +-
>  fs/jfs.c                                 |   14 +-
>  fs/minix.c                               |   13 +-
>  fs/ntfs.c                                |   16 +-
>  fs/reiserfs.c                            |   12 +-
>  fs/sfs.c                                 |   26 +-
>  fs/udf.c                                 |   16 +-
>  fs/ufs.c                                 |  161 +-
>  fs/xfs.c                                 |   14 +-
>  genmk.rb                                 |   25 +-
>  hello/hello.c                            |   12 +-
>  include/grub/datetime.h                  |   48 +
>  include/grub/disk.h                      |   13 +-
>  include/grub/efi/api.h                   |   82 +-
>  include/grub/efi/pe32.h                  |   11 +-
>  include/grub/fs.h                        |   14 +-
>  include/grub/i386/bsd.h                  |    9 +-
>  include/grub/i386/pc/memory.h            |   40 +-
>  include/grub/i386/pci.h                  |   35 +
>  include/grub/ieee1275/ieee1275.h         |   11 +-
>  include/grub/lib/arg.h                   |   72 +
>  include/grub/memory.h                    |   52 +
>  include/grub/misc.h                      |    6 +-
>  include/grub/sparc64/ieee1275/ieee1275.h |   22 +
>  include/grub/sparc64/kernel.h            |   30 +
>  include/grub/sparc64/libgcc.h            |   12 +
>  include/grub/term.h                      |   78 +-
>  include/grub/types.h                     |   22 +-
>  include/grub/usb.h                       |  207 +
>  include/grub/usbdesc.h                   |  119 +
>  include/grub/usbtrans.h                  |  107 +
>  kern/device.c                            |   58 +-
>  kern/disk.c                              |   11 +-
>  kern/dl.c                                |   30 +-
>  kern/efi/efi.c                           |   23 +
>  kern/i386/coreboot/init.c                |   17 +-
>  kern/i386/efi/startup.S                  |    6 +-
>  kern/i386/loader.S                       |  103 +-
>  kern/i386/pc/init.c                      |    9 +-
>  kern/i386/pc/startup.S                   |   18 +-
>  kern/ieee1275/ieee1275.c                 |   50 +-
>  kern/ieee1275/openfw.c                   |  113 +-
>  kern/main.c                              |   16 +-
>  kern/mm.c                                |   99 +-
>  kern/sparc64/dl.c                        |   12 +-
>  kern/x86_64/dl.c                         |    6 +-
>  lib/arg.c                                |  418 ++
>  lib/hexdump.c                            |   16 +
>  loader/efi/appleloader.c                 |   26 +-
>  loader/efi/chainloader.c                 |   28 +-
>  loader/i386/bsd.c                        |  148 +-
>  loader/i386/ieee1275/linux.c             |   34 +-
>  loader/i386/pc/chainloader.c             |   22 +-
>  loader/i386/pc/linux.c                   |   50 +-
>  loader/multiboot_loader.c                |   58 +-
>  loader/powerpc/ieee1275/linux.c          |   30 +-
>  normal/cmdline.c                         |   31 -
>  normal/completion.c                      |   22 +-
>  normal/datetime.c                        |  100 +
>  normal/menu_entry.c                      |   23 +-
>  normal/misc.c                            |   20 +-
>  term/efi/console.c                       |    6 +-
>  term/i386/pc/serial.c                    |   23 +-
>  term/terminfo.c                          |   14 +-
>  util/console.c                           |    6 +-
>  util/deviceiter.c                        |  621 ++
>  util/elf/grub-mkimage.c                  |   12 +-
>  util/grub-emu.c                          |    9 +
>  util/grub-fstest.c                       |   92 +-
>  util/grub-mkdevicemap.c                  |  589 +--
>  util/grub-pe2elf.c                       |   11 +-
>  util/grub.d/30_os-prober.in              |   52 +
>  util/hostfs.c                            |   13 +-
>  util/i386/pc/grub-install.in             |    8 +-
>  util/i386/pc/grub-setup.c                |   15 +-
>  util/usb.c                               |  191 +
>  122 files changed, 7004 insertions(+), 11381 deletions(-)
>
> --
> Bean
>



-- 
Bean

reply via email to

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