From 7870670d1e3dba21dc4b42352c01b85f72adeea1 Mon Sep 17 00:00:00 2001 From: Andrea Diamantini Date: Fri, 29 Jul 2011 23:33:48 +0200 Subject: Copyright year check fixes (waiting for a better regexp...) --- git_hooks/pre-commit/copyrightyear_check | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'git_hooks/pre-commit/copyrightyear_check') diff --git a/git_hooks/pre-commit/copyrightyear_check b/git_hooks/pre-commit/copyrightyear_check index 535b3c16..43c97d0c 100755 --- a/git_hooks/pre-commit/copyrightyear_check +++ b/git_hooks/pre-commit/copyrightyear_check @@ -41,7 +41,10 @@ case "${1}" in echo "Check the files that are being committed for a copyright with a proper year." ;; * ) - for file in `git diff-index --cached --name-only HEAD | /bin/grep -F .` ; do + for file in `git diff-index --cached --name-only HEAD | /bin/grep \.h$` ; do + test_file "${file}" + done + for file in `git diff-index --cached --name-only HEAD | /bin/grep \.cpp$` ; do test_file "${file}" done ;; -- cgit v1.2.1