no need to run git check-ignore on every file if you are not setting IGNORE_GITIGNORED_FILES (#4348)

This commit is contained in:
Stephen Abbene 2023-06-09 09:33:05 -07:00 committed by GitHub
parent 27f66fdac6
commit 6c1fcb284a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -304,7 +304,7 @@ function BuildFileList() {
################################################### ###################################################
# Filter files if FILTER_REGEX_EXCLUDE is not set # # 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}" debug "${FILE} is ignored by Git. Skipping ${FILE}"
continue continue
fi fi