gitlog

package
v0.13.2 Latest Latest
Warning

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

Go to latest
Published: Apr 7, 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

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ExecCommandFunc added in v0.12.1

type ExecCommandFunc func(name string, arg ...string) *exec.Cmd

ExecCommandFunc is the function signature matching exec.Command.

type GetCommitsFn

type GetCommitsFn func(since, until string) ([]string, error)

GetCommitsFn is the function type for GetCommits (used for dependency injection).

func DefaultGetCommitsFn added in v0.12.1

func DefaultGetCommitsFn() GetCommitsFn

DefaultGetCommitsFn returns a GetCommitsFn backed by a real GitLog instance.

type GitLog added in v0.12.1

type GitLog struct {
	ExecCommandFn ExecCommandFunc
	// TagPrefix scopes tag resolution to tags matching this prefix.
	// Empty means use the latest tag globally.
	TagPrefix string
	// ModulePath scopes git log to commits touching this directory.
	// Empty means no path filtering (all commits).
	ModulePath string
}

GitLog retrieves commit messages from a git repository.

func NewGitLog added in v0.12.1

func NewGitLog() *GitLog

NewGitLog creates a GitLog with the real exec.Command implementation.

func NewGitLogWithScope added in v0.13.1

func NewGitLogWithScope(tagPrefix, modulePath string) *GitLog

NewGitLogWithScope creates a GitLog scoped to a specific module. tagPrefix filters tag resolution (e.g. "<module-name>/v") and modulePath scopes git log to commits touching that directory (e.g. "<module-name>").

func (*GitLog) GetCommits added in v0.12.1

func (g *GitLog) GetCommits(since string, until string) ([]string, error)

GetCommits returns commit messages between since and until refs.

Jump to

Keyboard shortcuts

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