git

package
v1.3.2 Latest Latest
Warning

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

Go to latest
Published: Aug 21, 2019 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetCurrentTag

func GetCurrentTag(dir string) (string, error)

GetCurrentTag returns the tag of the HEAD commit of the git repository in the specified directory It returns an error if git isn't installed, or if there is some sort of I/O problem It does not return an error if git exits with a non-zero exit code, it assumes this means there are no tags

func GetCurrentTreeHash

func GetCurrentTreeHash(rootDir string, unstagedFiles ...string) (string, error)

GetCurrentTreeHash returns a hash of the git repository, consisting of the currently commited files, as well as any unstaged changes in the provided directories

func GetGitRoot

func GetGitRoot(dir string) (string, error)

GetGitRoot returns the directory which contains the .git folder

Types

This section is empty.

Jump to

Keyboard shortcuts

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