From 6c1fcb284aeab5f0e2f9a95ead67a12403571e97 Mon Sep 17 00:00:00 2001 From: Stephen Abbene <11637137+sabbene@users.noreply.github.com> Date: Fri, 9 Jun 2023 09:33:05 -0700 Subject: [PATCH] no need to run git check-ignore on every file if you are not setting IGNORE_GITIGNORED_FILES (#4348) --- lib/functions/buildFileList.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/functions/buildFileList.sh b/lib/functions/buildFileList.sh index 867183be..870bc6ac 100755 --- a/lib/functions/buildFileList.sh +++ b/lib/functions/buildFileList.sh @@ -304,7 +304,7 @@ function BuildFileList() { ################################################### # Filter files if FILTER_REGEX_EXCLUDE is not set # ################################################### - if git check-ignore "$FILE" && [ "${IGNORE_GITIGNORED_FILES}" == "true" ]; then + if [ "${IGNORE_GITIGNORED_FILES}" == "true" ] && git check-ignore "$FILE"; then debug "${FILE} is ignored by Git. Skipping ${FILE}" continue fi