git

package
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Apr 8, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Package git extracts historical signals (churn, co-change) from git history.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	RepoRoot      string
	WindowDays    int // default 90
	MaxCommitSize int // default 100
}

Config configures git signal extraction.

type Signals

type Signals struct {
	Churn      map[string]int    // file_path -> commit count
	CoChange   map[[2]string]int // ordered pair (a < b) -> frequency
	WindowDays int
	ComputedAt string // ISO 8601 timestamp of HEAD at extraction time
}

Signals holds aggregated git history signals for a repository.

func Extract

func Extract(cfg Config) (*Signals, error)

Extract extracts churn and co-change signals from git history. Uses a single git log invocation. Returns nil error on success. If git is unavailable or the repo has no history, returns an error.

Jump to

Keyboard shortcuts

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