Rust referenceloom-git
loom-git · import
Source declarations, signatures and documentation for import.
Source: sigil/weave/tools/loom-git/src/import.rs. SHA-256: a2340eb4a6690fa898df2c730717d4729f444fe62618283822a16e556424674b.
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.
import::ImportOpts
Knobs for an import run.
#[derive(Debug, Clone)]
pub struct ImportOpts {
/// Loom branch name to set at the tip after draining (default: `main`).
pub branch: String,
/// DID that signs the imported commits. The CLI defaults this to the
/// repo's own agent DID; library callers override as needed.
pub author: String,
/// Source ref to import (e.g. `HEAD`, `refs/heads/master`). Default `HEAD`.
pub source_ref: String,
/// If true, abort if any tree contains an unsupported entry (gitlinks,
/// non-utf8 paths). If false, warn and skip.
pub strict: bool
}Source line: 31.
import::ImportReport
Summary of what an import produced.
#[derive(Debug, Clone, Copy)]
pub struct ImportReport {
pub commits_imported: usize,
pub blobs_imported: usize,
pub total_blob_bytes: u64,
pub skipped_entries: usize
}Source line: 57.
import::import_git
Read a git repo and produce a drainable [ImportPlan].
pub fn import_git(git_path: &Path, opts: ImportOpts) -> Result<(ImportPlan, ImportReport)>;Source line: 65.