diff options
author | Joey Hess <joey@kitenet.net> | 2011-02-18 23:06:05 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2011-02-18 23:06:05 -0400 |
commit | 05a29cb5dd6397c62e42465978b95df074ea5fca (patch) | |
tree | d291602745b148f4f7280f740eaa24b4975ef365 /pre-commit.d/20warn-problem-files | |
parent | 884ef5ab74b01037fed70b1cdeff2174c47c7d8e (diff) |
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.
Diffstat (limited to 'pre-commit.d/20warn-problem-files')
-rwxr-xr-x | pre-commit.d/20warn-problem-files | 2 |
1 files changed, 1 insertions, 1 deletions
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 |