g_autoptr (GError) local_error = NULL;
GError **error = &local_error;
gboolean free_fetch_data = TRUE;
+ gboolean was_enoent = FALSE;
ostree_object_name_deserialize (fetch_data->object, &checksum, &objtype);
checksum_obj = ostree_object_to_string (checksum, objtype);
{
if (g_error_matches (local_error, G_IO_ERROR, G_IO_ERROR_NOT_FOUND))
{
+ was_enoent = TRUE;
if (fetch_data->is_detached_meta)
{
/* There isn't any detached metadata, just fetch the commit */
g_assert (pull_data->n_outstanding_metadata_fetches > 0);
pull_data->n_outstanding_metadata_fetches--;
- if (local_error == NULL)
+ if (local_error == NULL && !was_enoent)
pull_data->n_fetched_metadata++;
if (_ostree_fetcher_should_retry_request (local_error, fetch_data->n_retries_remaining--))
rm -rf repo
init_repo
${CMD_PREFIX} ostree --repo=repo pull --localcache-repo repo-local origin main >out.txt
-assert_file_has_content out.txt '3 metadata, 1 content objects fetched (4 meta, 5 content local)'
+assert_file_has_content out.txt '2 metadata, 1 content objects fetched (4 meta, 5 content local)'
echo "ok pull --localcache-repo"
# Check that pulling the same commit works as well