Merge "Prune old branches in early devstack clone"

This commit is contained in:
Jenkins 2016-01-18 22:28:53 +00:00 committed by Gerrit Code Review
commit 4fe52b5b29
1 changed files with 2 additions and 1 deletions

View File

@ -128,7 +128,8 @@ function get_repos_for_element(){
HAS_REF=$(git --git-dir=$CACHE_PATH/.git name-rev $REPOREF 2>/dev/null || true)
if [ -z "$DIB_OFFLINE" -o -z "$HAS_REF" ] ; then
echo "Updating cache of $REPOLOCATION in $CACHE_PATH with ref $REPOREF"
git --git-dir=$CACHE_PATH/.git fetch --update-head-ok $REPOLOCATION +refs/heads/*:refs/heads/*
git --git-dir=$CACHE_PATH/.git fetch --update-head-ok --prune \
$REPOLOCATION +refs/heads/*:refs/heads/*
fi
echo "Cloning from $REPONAME cache and applying ref $REPOREF"