git

package
v1.0.8 Latest Latest
Warning

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

Go to latest
Published: Apr 21, 2026 License: MIT Imports: 6 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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