From 6d454b46df7570eb82fd9d72ede7d81bf1320351 Mon Sep 17 00:00:00 2001 From: Rike-Benjamin Schuppner Date: Mon, 29 Feb 2016 14:55:51 +0100 Subject: Check several files at a time with git ls-files. --- pre-commit.d/20warn-problem-files | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pre-commit.d/20warn-problem-files b/pre-commit.d/20warn-problem-files index f28d5ac..4ffbfd1 100755 --- a/pre-commit.d/20warn-problem-files +++ b/pre-commit.d/20warn-problem-files @@ -12,8 +12,8 @@ elif [ "$VCS" = hg ]; then special=$(find . ! -type d ! -type f ! -type l | exclude_internal) || true hardlinks=$(find . -type f ! -links 1 -exec hg status {} \; | exclude_internal ) || true elif [ "$VCS" = git ]; then - special=$(find . ! -type d ! -type f ! -type l -exec git ls-files --exclude-standard --cached --others {} \; | exclude_internal) || true - hardlinks=$(find . -type f ! -links 1 -exec git ls-files --exclude-standard --cached --others {} \; | exclude_internal) || true + special=$(find . ! -type d ! -type f ! -type l -exec git ls-files --exclude-standard --cached --others {} + | exclude_internal) || true + hardlinks=$(find . -type f ! -links 1 -exec git ls-files --exclude-standard --cached --others {} + | exclude_internal) || true else special="" fi -- cgit v1.2.3