annotate

package
v0.4.5 Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2026 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Line

type Line struct {
	Text    string
	Version VersionInfo
}

Line represents an annotated line of a file, with the text and the version that last changed it.

func Annotate

func Annotate(r *repo.Repo, opts Options) ([]Line, error)

Annotate attributes each line of a file to the commit that last changed it. It walks the primary parent chain from StartRID, pushing line attributions back to the earliest ancestor that contains the same line.

type Options

type Options struct {
	FilePath  string          // pathname of the file to annotate
	StartRID  libfossil.FslID // checkin to start from (tip)
	Limit     int             // max ancestors to walk (0 = unlimited)
	OriginRID libfossil.FslID // stop at this checkin (0 = none)
}

Options controls the annotate operation.

type VersionInfo

type VersionInfo struct {
	UUID string
	User string
	Date time.Time
}

VersionInfo identifies the commit that last changed a line.

Jump to

Keyboard shortcuts

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