From 05a29cb5dd6397c62e42465978b95df074ea5fca Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Fri, 18 Feb 2011 23:06:05 -0400 Subject: correct exclude_external regexp to match fully relative paths git ls-files emits paths with no leading subdirectory. But the regexp still needs to avoid false positives. --- pre-commit.d/20warn-problem-files | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pre-commit.d/20warn-problem-files b/pre-commit.d/20warn-problem-files index 3e9e476..e1bbd84 100755 --- a/pre-commit.d/20warn-problem-files +++ b/pre-commit.d/20warn-problem-files @@ -2,7 +2,7 @@ set -e exclude_internal () { - grep -v '/\(.git\|.hg\|.bzr\|_darcs\)/' + egrep -v '(^|/)(.git|.hg|.bzr|_darcs)/' } if [ "$VCS" = hg ] || [ "$VCS" = bzr ] || [ "$VCS" = darcs ]; then -- cgit v1.2.3