pub struct Scan {
pub exposed: Vec<Exposure>,
pub commits: usize,
pub blobs: usize,
pub unreadable: usize,
pub unresolved_refs: usize,
pub unresolved_names: Vec<String>,
pub refs_unavailable: bool,
pub partial: bool,
pub shallow: bool,
pub notes: Vec<String>,
pub warnings: Vec<String>,
}Expand description
What one scan found.
Fields§
§exposed: Vec<Exposure>Declared paths held in the clear, sorted by path.
commits: usizeHow many commits were visited.
blobs: usizeHow many distinct blobs under a declared path were inspected.
unreadable: usizeObjects that could not be read, so could not be judged.
Separate from Scan::warnings because the count changes what the
report means: a scan that skipped something has not proved anything about
it, and must not be summarised as though it had.
unresolved_refs: usizeReferences the walk could not start from.
Counted apart from the objects for the same reason and a sharper one: a
reference store that cannot be read at all yields no tips, so the
scan visits nothing and finds nothing. Measured on the build before this
existed — chmod 000 .git/packed-refs and a removed loose branch left
status reporting a repository with a plaintext blob in its history as
clean, exit code 0. A warning on stderr is not enough: a CI gate reads
the code.
unresolved_names: Vec<String>Names of the references the walk could not start from, capped.
The count alone reaches stdout as “1 reference(s) could not be
resolved”, which tells an operator reading a CI log nothing they can act
on. The names are what turn it into an instruction.
The reference store could not be enumerated at all, so nothing here covers anything.
partial: boolThis repository fetches objects lazily, so some were never downloaded.
The twin of Scan::shallow, and it was making the same mistake: a
promisor object is absent by design, and reporting it as unreadable sent
the user to git fsck, which exits 0 on a partial clone and reports
nothing at all.
shallow: boolThis is a shallow clone, so history stops at the graft points.
Reported rather than treated as corruption. A shallow clone is an
ordinary, healthy state — and before this was honoured, the walk queued
the parents git deliberately did not fetch, failed to read them, and told
the user that objects were missing and to run git fsck, which is happy
with a shallow clone and would have reported nothing. The finding still
stands, because a history that was never fetched genuinely cannot be
vouched for; only the explanation was wrong.
notes: Vec<String>Things worth stating that are not findings — a reference deliberately
not walked, a file under refs/ that git ignores too.
warnings: Vec<String>Anything worth saying once, carried out so the binary owns the messages.