ostree/apidoc
Colin Walters 73d910e82e Add public API for fsck, use it before loading metadata
A while ago I did `truncate -s 0 /path/to/repo/00/123.commit`, and expected a
checksum error, but I actually got a validation error due to us loading the
commit into a variant and trying to parse out the parent checksum, etc.

I first started by changing the `load_and_fsck_one_object()` function to
checksum before loading, but the problem is that we do a traverse of all objects
first. Fixing this is going to require an `OSTREE_REPO_COMMIT_TRAVER_FLAG_FSCK`
or something.

In the meantime at least though, let's add a public API to fsck a single object
which *does* checksum cleanly before parsing the object, and change the `fsck`
command to use it.

We then change the fsck binary to do this while iterating over the refs
and finding the commit object.  This way we'll at least get a checksum
first for commit objects, even if not dirtree/dirmeta.

Closes: #1364
Approved by: jlebon
2017-12-12 14:03:09 +00:00
..
.gitignore docs: Get API docs working again 2016-06-09 18:15:49 +00:00
Makefile.am build: Add --enable-experimental-api configure option for unstable APIs 2017-05-08 18:48:07 +00:00
ostree-docs.xml docs: Get API docs working again 2016-06-09 18:15:49 +00:00
ostree-experimental-sections.txt lib/repo: Add locking auto cleanup handler 2017-12-05 02:32:47 +00:00
ostree-sections.txt Add public API for fsck, use it before loading metadata 2017-12-12 14:03:09 +00:00