pull local: Don't import objects we already have

In particular, I noticed this because the pull failed when trying to
pull from a shallow repo which only had the new objects that was
needed.

https://bugzilla.gnome.org/show_bug.cgi?id=764059
This commit is contained in:
Alexander Larsson 2016-03-23 09:28:17 +01:00 committed by Colin Walters
parent 2454957e8d
commit ddf0a02f88
1 changed files with 2 additions and 1 deletions

View File

@ -1188,7 +1188,8 @@ scan_one_metadata_object_c (OtPullData *pull_data,
if (pull_data->remote_repo_local)
{
if (!ostree_repo_import_object_from (pull_data->repo, pull_data->remote_repo_local,
if (!is_stored &&
!ostree_repo_import_object_from (pull_data->repo, pull_data->remote_repo_local,
objtype, tmp_checksum,
cancellable, error))
goto out;