pub struct ImportStats {
pub commits_imported: usize,
pub states_created: usize,
pub branches_synced: usize,
pub tags_synced: usize,
pub skipped_non_commit_refs: usize,
pub lossy_entries: Vec<LossyImportEntry>,
}Expand description
Statistics for import operation.
commits_imported counts every commit visited by the ancestry walk;
states_created counts only the commits whose heddle state did not
yet exist in the store. They diverge whenever a ref is re-imported
(the second import git --ref X against the same source
reports commits_imported = N and states_created = 0) — that
distinction is what surfaces “already in sync” instead of leaving
the operator staring at a misleading commits_imported: 0
(heddle#147).
Fields§
§commits_imported: usizeTotal commits walked from the source refs, including ones whose heddle state was already present. Mirrors what explicit Git projection ingest` reports so the two verbs read the same way.
states_created: usizeNew state objects written to the heddle store during this import. Stays at 0 when every visited commit already had a heddle state — that’s the signal the bridge is in sync.
branches_synced: usize§skipped_non_commit_refs: usizeRefs (typically annotated tags) that point at a non-commit object —
most often a blob (e.g. git/git’s refs/tags/junio-gpg-pub
pointing at the maintainer’s GPG public key blob) or a tree
(e.g. git-lfs’s refs/tags/core-gpg-keys).
These are skipped during walk because heddle’s marker model currently requires the target to be a commit. The full-fidelity fix is to extend the marker model with a non-commit-ref variant; until then we record them here so callers can surface what was skipped.
lossy_entries: Vec<LossyImportEntry>Git tree entries converted under an explicit lossy import opt-in.