Skip to content

Commit

Permalink
Do a full clone when tag filter is set
Browse files Browse the repository at this point in the history
  • Loading branch information
Régis Belson committed Feb 28, 2018
1 parent 94a5f1e commit f7a3a30
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
8 changes: 7 additions & 1 deletion assets/check
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,17 @@ if [ -d $destination ]; then
git reset --hard FETCH_HEAD
else
branchflag=""
singlebranchflag="--single-branch"

if [ -n "$branch" ]; then
branchflag="--branch $branch"
else
if [ -n "$tag_filter" ]; then
singlebranchflag=""
fi
fi

git clone --single-branch $uri $branchflag $destination
git clone $singlebranchflag $uri $branchflag $destination
cd $destination
fi

Expand Down
7 changes: 6 additions & 1 deletion assets/in
Original file line number Diff line number Diff line change
Expand Up @@ -49,16 +49,21 @@ if [ -z "$uri" ]; then
fi

branchflag=""
singlebranchflag="--single-branch"
if [ -n "$branch" ]; then
branchflag="--branch $branch"
else
if [ "$ref" != "HEAD" ]; then
singlebranchflag=""
fi
fi

depthflag=""
if test "$depth" -gt 0 2> /dev/null; then
depthflag="--depth $depth"
fi

git clone --single-branch $depthflag $uri $branchflag $destination
git clone $singlebranchflag $depthflag $uri $branchflag $destination

cd $destination

Expand Down

0 comments on commit f7a3a30

Please sign in to comment.