diff --git a/assets/check b/assets/check index 56e4b74f..eb4b93a3 100755 --- a/assets/check +++ b/assets/check @@ -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 diff --git a/assets/in b/assets/in index a988f8e2..2e15b23c 100755 --- a/assets/in +++ b/assets/in @@ -49,8 +49,13 @@ 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="" @@ -58,7 +63,7 @@ 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