gitlog

package
v0.25.1 Latest Latest
Warning

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

Go to latest
Published: Aug 19, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package gitlog is a tiny, dependency-free reader over `git log`, shared by the context compiler, provenance, predict and producer attribution. All functions degrade to empty results when git is unavailable or the path has no history.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Commit

type Commit struct {
	Hash        string `json:"hash"`
	Author      string `json:"author"`
	AuthorEmail string `json:"author_email"`
	Date        string `json:"date"`
	Subject     string `json:"subject"`
	Body        string `json:"body"`
}

Commit is one entry from git history.

func First

func First(ctx context.Context, root, path string) (Commit, bool)

First returns the commit that introduced path, if any.

func Recent

func Recent(ctx context.Context, root, path string, n int) []Commit

Recent returns up to n most-recent commits touching path ("" or "." = whole repo), newest first.

Jump to

Keyboard shortcuts

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