git

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Nov 17, 2026 License: Apache-2.0 Imports: 8 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

func GetLatestTag

func GetLatestTag(path string) (tag, commit string, err error)

func RepoVersion

func RepoVersion(path string) (tag, commit string, err error)

RepoVersion

Types

type Revision added in v0.4.0

type Revision struct {
	// Commit is the hash of the commit.
	Commit string

	// Time is when it was committed, in UTC.
	Time time.Time

	// Tags are the tags on the commit itself, sorted.
	Tags []string

	// AncestorTags are the tags on the commits it descends from, sorted.
	// A tag on a commit that is not in its history, on another branch,
	// is in neither list.
	AncestorTags []string
}

Revision describes the commit a repository is at, with what its history says about it. It carries facts and no version: how they make one is up to whoever names the code, and ecosystems differ (see RepoVersion for the generic form).

func HeadRevision added in v0.4.0

func HeadRevision(path string) (*Revision, error)

HeadRevision reads the commit a repository's HEAD is at.

Jump to

Keyboard shortcuts

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