gitlog

package
v0.24.4 Latest Latest
Warning

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

Go to latest
Published: Aug 30, 2026 License: MIT Imports: 11 Imported by: 0

Documentation

Overview

Package gitlog reads commit history with go-git (no git binary).

Index

Constants

This section is empty.

Variables

View Source
var Stop = fmt.Errorf("gitlog: stop")

Stop ends a log walk early (limit reached).

Functions

func Bind added in v0.22.0

func Bind(c *CLI) *flaggy.Parser

func ParseSince added in v0.22.0

func ParseSince(s string) (time.Time, error)

func Parser added in v0.22.0

func Parser() *flaggy.Parser

func RepoName

func RepoName(repo string) (string, error)

Types

type CLI added in v0.22.0

type CLI struct {
	Repo, Root, Since string
	Limit             int
	JSONOut           bool
}

func ParseArgs added in v0.22.0

func ParseArgs(args []string) (CLI, error)

type Commit

type Commit struct {
	SHA     string   `json:"sha"`
	Author  string   `json:"author"`
	Email   string   `json:"email"`
	Date    string   `json:"date"`
	Subject string   `json:"subject"`
	Files   []string `json:"files"`
}

func Log

func Log(repo string, opt Options) ([]Commit, error)

Log walks commits from HEAD, newest first, skipping merges.

type Leaf

type Leaf struct {
	Source  string `json:"source"`
	Repo    string `json:"repo"`
	Heading string `json:"heading"`
	Text    string `json:"text"`
	Type    string `json:"type"`
	Status  string `json:"status"`
	Related string `json:"related"`
}

func ToLeaf

func ToLeaf(c Commit, repo string) Leaf

type Options

type Options struct {
	Limit int
	Since time.Time
}

Jump to

Keyboard shortcuts

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