`*-checkout` visits interfere with incremental loading
Incremental loaders use swh.storage.algos.snapshot.snapshot_get_latest
to get the previous state of their load (git, hg, svn) so they only load objects not reachable from branches in that latest snapshot.
However, if the origin is referenced by nix/guix, then the same origin has git-checkout
/hg-checkout
/svn-checkout
visits, which point to a snapshot with only a subset of the branches. So when an incremental loader runs when the last visit has one of these types, it incrementally loads starting from that incomplete snapshot, instead of the snapshot of the last full run of the incremental loader. This causes it to fetch more objects than it needs to.
We could resolve this by changing the calls to snapshot_get_latest
to filter the visit type.