git

package
v1.9.3 Latest Latest
Warning

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

Go to latest
Published: Jan 16, 2023 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Check added in v1.6.3

func Check(dir string) bool

Check returns true if the current directory is in a git repository.

func InferModuleVersion

func InferModuleVersion(dir string) (string, error)

InferModuleVersion returns the version of the module declared in the given directory. This will be either the work tree commit's tag, or it will be the most recent tag with a short revhash appended to it.

func InferRepo added in v1.4.0

func InferRepo(dir string) (string, error)

InferRepo gets a human-readable repository name from the git clone enclosing the given directory.

func TopLevel

func TopLevel(dir string) (string, error)

TopLevel returns the root of the git project containing the given directory.

Types

This section is empty.

Jump to

Keyboard shortcuts

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