diff options
Diffstat (limited to 'git_hooks/pre-commit')
-rwxr-xr-x | git_hooks/pre-commit/copyrightyear_check | 5 |
1 files changed, 4 insertions, 1 deletions
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 ;; |