MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / import_branch

Method import_branch

atomic-cli/src/commands/git/parallel.rs:4831–4838  ·  view source on GitHub ↗

Import commits from a branch into an Atomic repository. Commits are processed in **batches** to keep memory bounded and show progress sooner. Each batch: parse in parallel → write sequentially. Imports use a fixed 1,000-commit batch size. This keeps progress and memory behavior predictable across small and large repositories.

(
        &self,
        branch_name: &str,
        repo: &mut Repository,
    )

Source from the content-addressed store, hash-verified

4829 /// Imports use a fixed 1,000-commit batch size. This keeps progress and
4830 /// memory behavior predictable across small and large repositories.
4831 pub fn import_branch(
4832 &self,
4833 branch_name: &str,
4834 repo: &mut Repository,
4835 ) -> CliResult<ImportStats> {
4836 let plan = self.validate_branch_prospectively(branch_name, Some(repo))?;
4837 self.import_prevalidated(branch_name, repo, plan)
4838 }
4839
4840 #[tracing::instrument(
4841 name = "import",

Callers

nothing calls this directly

Calls 2

import_prevalidatedMethod · 0.80

Tested by

no test coverage detected