git

package
v0.0.4-rc.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 12, 2026 License: MIT Imports: 11 Imported by: 0

Documentation

Overview

Package git extracts deterministic commit-mutation traces from Git repos.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CanonicalRepoIDFromURL

func CanonicalRepoIDFromURL(repoURL string) (string, error)

CanonicalRepoIDFromURL derives the evaluation repository identity from a GitHub HTTPS repository URL.

func CloneForReplay

func CloneForReplay(ctx context.Context, repoURL, baseDir string) (string, error)

CloneForReplay creates a fresh managed clone for repoURL under baseDir.

func ClonePathForURL

func ClonePathForURL(baseDir, repoURL string) (string, error)

ClonePathForURL returns the local clone path for a GitHub HTTPS repository under baseDir.

Types

type Source

type Source struct {
	RepoURL      string
	RepoPath     string
	CloneBaseDir string
	Ref          string
	Limit        int
	FirstParent  bool
}

Source streams Git object commit snapshots as replay.CommitMutation values.

func (Source) CommitCount added in v0.0.3

func (s Source) CommitCount(ctx context.Context) (int, error)

CommitCount returns the number of commits Source.Walk would visit after applying ref, first-parent, and limit settings.

func (Source) Walk

func (s Source) Walk(ctx context.Context, fn func(replay.CommitMutation) error) error

Walk visits commits in chronological replay order.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL