loom-git · plan
Source declarations, signatures and documentation for plan.
Source: sigil/weave/tools/loom-git/src/plan.rs. SHA-256: a795aeb383f6a01bfcd2429d69f8c3287ffdce7f42b9ed088b68ac68ec85d767.
This reference follows declared source modules, retains conditional attributes, and includes public declarations and implementation methods. Private-module re-exports and trait resolution require the compiler; this is a source reference, not a claim that every listed item is a root import. Function bodies and constant values are omitted.
plan::BlobDraft
One blob to write into the loom blobs Locus drive.
#[derive(Debug, Clone)]
pub struct BlobDraft {
/// BLAKE3 hex of `content` — the path-suffix in the blobs locus
/// (`/blobs/<blob_hash>`).
pub blob_hash: String,
/// Raw bytes. Bounded by git's blob-size policy on the source side; the
/// importer doesn't slice large blobs.
pub content: Vec<u8>
}Source line: 27.
plan::CommitDraft
One commit to append, after blob writes complete.
#[derive(Debug, Clone)]
pub struct CommitDraft {
/// Source git oid (40-char lowercase hex). Recorded in the structured
/// `imported-from-git` trailer of the commit message and surfaced by
/// `loom log --git-oid`.
pub git_oid: String,
/// Indices into [`ImportPlan::commits`] of this commit's parents. Empty
/// for the root commit; one entry for normal commits; ≥2 for merges.
pub parents: Vec<usize>,
/// The commit body (tree + tree_id + author + timestamp + message),
/// minus parents — those are filled in at drain time once seq numbers
/// are known.
pub commit_template: Commit
}Source line: 38.
plan::ImportPlan
The fully-prepared import. The CLI shim drains this and writes to a real loom repo.
#[derive(Debug, Clone)]
pub struct ImportPlan {
/// Deduped blobs (one entry per unique BLAKE3 hash).
pub blobs: Vec<BlobDraft>,
/// Commits in topo order (parents come first).
pub commits: Vec<CommitDraft>,
/// Branch name to set at the tip after draining (typically `main`).
pub branch: String
}Source line: 55.
plan::ImportPlan::total_blob_bytes
Total number of bytes across all blobs (informational).
pub fn total_blob_bytes(&self) -> u64;Source line: 66.
plan::ImportPlan::unique_blob_count
Convenience for callers verifying dedup ratio.
pub fn unique_blob_count(&self) -> usize;Source line: 71.
plan::ImportPlan::commit_count
Number of commits in the plan.
pub fn commit_count(&self) -> usize;Source line: 76.