Comment 1 for bug 1301435

Revision history for this message
stephen mulcahy (stephen-mulcahy) wrote :

Looking at diskimage-builder/elements/source-repositories/extra-data.d/98-source-repositories the problematic section seems to be

               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}
                fi

changing

                    git --git-dir=$CACHE_PATH/.git fetch --update-head-ok $REPOLOCATION ${REPOREF}:${REPOREF}
to
                    git --git-dir=$CACHE_PATH/.git fetch --update-head-ok $REPOLOCATION

eliminates this error - while this may make the fetch more extensive, and slightly slower, given its only updating cached repos and the other approach results in errors, I think the fix is preferable