Skip to content

Commit

Permalink
Merge pull request #418 from rmg/optimize-check
Browse files Browse the repository at this point in the history
Optimize check
  • Loading branch information
taylorsilva committed Mar 16, 2024
2 parents a7587c9 + c392e87 commit 9c16470
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions assets/check
Original file line number Diff line number Diff line change
Expand Up @@ -58,16 +58,20 @@ export GIT_LFS_SKIP_SMUDGE=1

if [ -d $destination ]; then
cd $destination
git fetch $tagflag -f
git reset --hard FETCH_HEAD
git fetch origin $tagflag $branch -f
git reset --soft FETCH_HEAD
else
branchflag=""
if [ -n "$branch" ]; then
branchflag="--branch $branch"
fi

git clone --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
git remote set-branches --add origin $branch
fi
fi

if [ -n "$ref" ] && git cat-file -e "$ref"; then
Expand Down

0 comments on commit 9c16470

Please sign in to comment.