lib/pull: Fix miscounting of missing metadata
authorJonathan Lebon <jonathan@jlebon.com>
Fri, 8 Sep 2023 20:50:47 +0000 (16:50 -0400)
committerJonathan Lebon <jonathan@jlebon.com>
Fri, 8 Sep 2023 21:49:25 +0000 (17:49 -0400)
commitc8ed1c7a871c0cfe5ec1e4c0b0971f1433b62992
tree67026cf6426d99971ee869f653fcc0a5651bf1f6
parent3c2587b619a268bd83ab4924a905e0b325250b73
lib/pull: Fix miscounting of missing metadata

If e.g. detached metadata or a parent commit is missing, we
don't consider it an error but we erroneously still increment the
`n_fetched_metadata` counter, causing it to be higher than it should.

This will implicitly be tested by a test added in the next patch.
src/libostree/ostree-repo-pull.c
tests/test-pull-localcache.sh