Skip to content

Commit

Permalink
check: use blobless partial clones
Browse files Browse the repository at this point in the history
The check operation doesn't need any blobs. The most detail is ever
needs about commits is the paths they touched, which only requires
commit and tree objects, not the blobs.

On large repositories, especially with lots of history, this can
dramatically reduce the time to clone and fetch while also dramatically
reducing the server-side resources used to serve up those large git
repositories.

Signed-off-by: Ryann Graham <[email protected]>
  • Loading branch information
rmg committed Nov 20, 2023
1 parent 1a71141 commit c392e87
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion assets/check
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ else
branchflag="--branch $branch"
fi

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

0 comments on commit c392e87

Please sign in to comment.