Skip to main content

import_from_git

Function import_from_git 

Source
pub fn import_from_git(
    git_path: &Path,
    suture_path: &Path,
    author: &str,
) -> Result<ImportResult, BridgeError>
👎Deprecated since 0.1.0:

Git bridge is experimental and may lose data. See module docs.

Expand description

Import a Git repository into a Suture repository.

Creates a new Suture repository at suture_path and imports all commits from the Git repository at git_path.

§Arguments

  • git_path - Path to the source Git repository
  • suture_path - Path where the Suture repository will be created
  • author - Author name for imported commits

§How it works

  1. Creates a new Suture repository at suture_path
  2. Runs git log --reverse to get commits in chronological order
  3. For each commit: a. Runs git show <sha> to get file changes b. Creates the appropriate Suture patch (create/modify/delete) c. Commits to the Suture repository
  4. Recreates branch structure

⚠️ EXPERIMENTAL — Known to lose branch topology, merge structure, and intermediate file contents. See module-level documentation.