From f7a3a300fdca011ec431d46857f88a86f4dd6f23 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9gis=20Belson?= Date: Wed, 28 Feb 2018 16:48:32 +0100 Subject: [PATCH] Do a full clone when tag filter is set --- assets/check | 8 +++++++- assets/in | 7 ++++++- 2 files changed, 13 insertions(+), 2 deletions(-) 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