]> git.r.bdr.sh - rbdr/ngx_http_office_hours_filter_module/blob - scripts/git-hooks/pre-commit
3c05f4579a709ddf2f7bc2074b7a5279fc8ef5a2
[rbdr/ngx_http_office_hours_filter_module] / scripts / git-hooks / pre-commit
1 #!/usr/bin/env sh
2
3 SOURCES=$(git diff --cached --name-only --diff-filter=ACMR | grep -E "\.c$")
4
5 set -e
6 make format
7
8 for SOURCE in ${SOURCES}; do
9 git add ${SOURCE}
10 done