diff --git a/.githooks/pre-commit b/.githooks/pre-commit index 25e4bafd3..4c127c3d4 100755 --- a/.githooks/pre-commit +++ b/.githooks/pre-commit @@ -15,7 +15,7 @@ exec 1>&2 tmpdir=$(mktemp -d repo-XXXXXXXX) trap "rm -rf $tmpdir" EXIT INT -modified_files=$(git diff --cached --name-only --diff-filter=AM $against | sed -nE "/.*\.(cpp|cc|cxx|c|h|hpp|lcp)/p") +modified_files=$(git diff --cached --name-only --diff-filter=AM $against | sed -nE "/.*\.(cpp|cc|cxx|c|h|hpp|lcp)$/p") for file in $modified_files; do echo "Checking $file..."