git

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: May 27, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FileHistory

type FileHistory struct {
	Path          string
	CommitCount   int
	FirstCommitAt int64
	LastCommitAt  int64
	AuthorCount   int
	LastAuthor    string
	LastSubject   string
}

FileHistory holds git commit statistics for a single file.

func CollectHistory

func CollectHistory(gitRoot, relPath string) FileHistory

CollectHistory runs git log to gather change history for relPath within gitRoot. Returns a zero-value FileHistory (CommitCount == 0) on any error: git not installed, directory not a git repo, or file untracked.

Jump to

Keyboard shortcuts

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