Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion assets/check
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,16 @@ else
branchflag="--branch $branch"
fi

git clone --bare --filter=blob:none --single-branch --progress $uri $branchflag $destination $tagflag
# Determine optimal filter based on whether path filtering is used
if [ "$paths" = "." ] && [ -z "$ignore_paths" ]; then
# No path filtering - use most aggressive filter for maximum performance
filter_flag="--filter=tree:0"
else
# Path filtering needed - keep trees to analyze paths, skip blobs
filter_flag="--filter=blob:none"
fi

git clone --bare $filter_flag --single-branch --progress $uri $branchflag $destination $tagflag
cd $destination
# bare clones don't configure the refspec
if [ -n "$branch" ]; then
Expand Down