git

package
v0.241228.0 Latest Latest
Warning

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

Go to latest
Published: Dec 28, 2024 License: 0BSD Imports: 4 Imported by: 0

Documentation

Overview

Package git implements the git interaction for effdump.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type VersionSystem

type VersionSystem struct{}

VersionSystem implements git version lookup via parsing `git` CLI tool's output. It uses the first ~7 characters of the full commit ID for the version strings.

func New

func New() *VersionSystem

New returns a new git VersionSystem.

func (*VersionSystem) HasChanges

func (*VersionSystem) HasChanges(context.Context) (bool, error)

HasChanges returns whether working dir has changes or not.

func (*VersionSystem) Resolve

func (*VersionSystem) Resolve(_ context.Context, rev string) (version string, err error)

Resolve resolves references such as HEAD or "ab12" to the full version string.

Jump to

Keyboard shortcuts

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