Documentation
¶
Overview ¶
Package gitinfo provides lightweight, cached git metadata (last-commit dates) for content files. It shells out to `git` and degrades silently when git is unavailable or the project is not a repository.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func LastAuthors ¶
LastAuthors returns up to n distinct author names from the most recent commits touching path, most recent first. It returns nil when git is unavailable or the file is untracked/unchanged. Results are cached per (root, repository-relative path, n).
func LastCommit ¶
LastCommit returns the committer date (RFC3339) of the last commit touching path, or "" when git is unavailable or the file is untracked/unchanged. Backed by a single-pass per-root index (built once per process).
Types ¶
type Index ¶
type Index struct {
// contains filtered or unexported fields
}
Index holds per-file git metadata computed in a single `git log` pass, so a build reads commit dates/authors for every page without spawning a git process per file.
func (*Index) Authors ¶
Authors returns up to n distinct recent authors of path (most recent first).
func (*Index) LastCommit ¶
LastCommit returns the committer date (RFC3339) of the last commit touching path, or "" when unknown.