ostree/fsck: Add --verify-back-refs option
authorPhilip Withnall <withnall@endlessm.com>
Mon, 20 Nov 2017 13:16:35 +0000 (13:16 +0000)
committerAtomic Bot <atomic-devel@projectatomic.io>
Thu, 14 Dec 2017 14:18:44 +0000 (14:18 +0000)
commitfb7692bd448ef0a395485a79a050193e50e417ac
treef030cfe21a36eb9b4c782a1afc05e1351b2904c9
parent38152d71aa0fc1167313723ec190b65421324472
ostree/fsck: Add --verify-back-refs option

This new option verifies that the refs listed in the ref-bindings for
each commit all point to that commit (i.e. there aren’t multiple commits
listing the same ref in their ref-bindings, and there aren’t any commits
with non-empty ref-bindings which aren’t pointed at by a ref).

This is useful when generating a new repository from scratch, but not
useful when adding new commits to an existing repository (since the old
commits will still, correctly, have ref-bindings from when the refs
pointed at them). That’s why it has to be enabled explicitly using
--verify-back-refs, rather than being on by default.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
Closes: #1347
Approved by: cgwalters
bash/ostree
man/ostree-fsck.xml
src/ostree/ot-builtin-fsck.c