git

package
v0.1.12 Latest Latest
Warning

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

Go to latest
Published: Mar 19, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Check

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

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