From f8416b1fe5905d8e9796aba51372ce33556bdfb5 Mon Sep 17 00:00:00 2001 From: Jon-Paul Sullivan Date: Wed, 2 Apr 2014 16:25:48 +0100 Subject: [PATCH] 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 --- .../source-repositories/extra-data.d/98-source-repositories | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/elements/source-repositories/extra-data.d/98-source-repositories b/elements/source-repositories/extra-data.d/98-source-repositories index 6f417fc7..d0edb9c9 100755 --- a/elements/source-repositories/extra-data.d/98-source-repositories +++ b/elements/source-repositories/extra-data.d/98-source-repositories @@ -96,7 +96,7 @@ 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 ${REPOREF}:${REPOREF} + git --git-dir=$CACHE_PATH/.git fetch --update-head-ok $REPOLOCATION +refs/heads/*:refs/heads/* fi echo "Cloning from $REPONAME cache and applying ref $REPOREF"