libostree/upgrader: Don't pull if there is no remote

In this case we're just reading the local repo.
This commit is contained in:
Colin Walters 2014-03-27 07:36:50 -04:00
parent 9389b7961c
commit 11ecf9267e

View File

@ -447,10 +447,13 @@ ostree_sysroot_upgrader_pull (OstreeSysrootUpgrader *self,
error))
goto out;
if (!ostree_repo_pull (repo, self->origin_remote, refs_to_fetch,
flags, progress,
cancellable, error))
goto out;
if (self->origin_remote)
{
if (!ostree_repo_pull (repo, self->origin_remote, refs_to_fetch,
flags, progress,
cancellable, error))
goto out;
}
if (!ostree_repo_resolve_rev (repo, origin_refspec, FALSE, &self->new_revision,
error))