Skip to content
Snippets Groups Projects
Commit 6c86bf73 authored by Bert Wesarg's avatar Bert Wesarg :keyboard:
Browse files

check: Use Git attributes to determine if a file is a Git LFS file

parent 9c671a71
No related branches found
No related tags found
2 merge requests!1164Automated merge from preview to main,!1156Improve `git-diff` usage and fix monikers
......@@ -34,11 +34,11 @@
large_files_present=false
branch="origin/${CI_MERGE_REQUEST_TARGET_BRANCH_NAME:-preview}"
source_hash=`git merge-base HEAD "${branch}"`
lfsfiles=$(git lfs ls-files -n)
for f in $(git diff --name-only --diff-filter=d ${source_hash}); do
# Do not check size of git lfs files.
if [[ ${lfsfiles} =~ "${f}" ]]; then
filter_attribute=$(git check-attr filter -- "${f}")
if [[ "${filter_attribute#*: filter: }" = "lfs" ]]; then
echo "Skip file ${f} because it is a git lfs file."
continue
fi
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment