Skip to content

gogit v0.13.0 Release Notes

Release Date: 2026-09-27

Overview

This release closes two small but real gaps: inspecting a commit's message body, not just its diff, and asking about a single file's push status without re-deriving it from scratch. Both were previously only reachable by shelling out to git directly instead of going through gogit. No breaking changes.

Highlights

Commit message bodies, opt-in

LogOptions.IncludeBody adds each commit's message body (%b) to the new Commit.Body field:

commits, err := repo.Log(ctx, gogit.LogOptions{IncludeBody: true})
for _, c := range commits {
    fmt.Println(c.Subject) // first line only
    fmt.Println(c.Body)    // everything after it, if requested
}

It's opt-in like IncludeStats, since a body costs proportionally more per commit than the subject/trailers most callers already get. Leaving it unset keeps Commit.Body empty and the existing fixed-field log parsing unchanged — no output shape change for existing callers.

Which commit last touched a path

Repo.LastCommitTouching(ctx, at, path) returns the most recent commit at or before a revision that modified a path, or "" if none:

commit, err := repo.LastCommitTouching(ctx, "HEAD", "config/local.env")
if commit != "" {
    refs, err := repo.RefsContaining(ctx, commit)
    // has this specific file's committed content already reached a remote?
}

Combined with v0.12.0's RefsContaining, this answers a question that previously took a manual git log -1 -- path plus a second query: has this specific file's committed content already reached a remote, independent of whether HEAD overall has been pushed.

Upgrade Notes

Both additions are additive — no changes to any existing method's signature or behavior. AGENTS.md replaces CLAUDE.md as this repo's coding-agent guidance file (same content, new filename — Claude Code and other agents now read AGENTS.md natively).

Installation

go get github.com/grokify/gogit@v0.13.0
go install github.com/grokify/gogit/cmd/gitscan@v0.13.0

See CHANGELOG.md for the categorized commit list.