Change refspec used to fetch all branches and tags
When the repository references are sha1s the fetch command used will not work. This will ensure that all of the objects are still fetched, and all of the local cache references for branches and tags will be updated rather than just the specified reference in use. Change-Id: Iad2554b3087a5da37dac6e9f6a72432d49fce83d Closes-Bug: #1301435
This commit is contained in:
parent
f49e8a42c4
commit
f8416b1fe5
@ -96,7 +96,7 @@ function get_repos_for_element(){
|
|||||||
HAS_REF=$(git --git-dir=$CACHE_PATH/.git name-rev $REPOREF 2>/dev/null || true)
|
HAS_REF=$(git --git-dir=$CACHE_PATH/.git name-rev $REPOREF 2>/dev/null || true)
|
||||||
if [ -z "$DIB_OFFLINE" -o -z "$HAS_REF" ] ; then
|
if [ -z "$DIB_OFFLINE" -o -z "$HAS_REF" ] ; then
|
||||||
echo "Updating cache of $REPOLOCATION in $CACHE_PATH with ref $REPOREF"
|
echo "Updating cache of $REPOLOCATION in $CACHE_PATH with ref $REPOREF"
|
||||||
git --git-dir=$CACHE_PATH/.git fetch --update-head-ok $REPOLOCATION ${REPOREF}:${REPOREF}
|
git --git-dir=$CACHE_PATH/.git fetch --update-head-ok $REPOLOCATION +refs/heads/*:refs/heads/*
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "Cloning from $REPONAME cache and applying ref $REPOREF"
|
echo "Cloning from $REPONAME cache and applying ref $REPOREF"
|
||||||
|
Loading…
Reference in New Issue
Block a user