Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Do a full clone when tag filter is set and branch is not #176

Closed
Show file tree
Hide file tree
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
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