gitutil

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Nov 1, 2021 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package gitutil provides convenient interfaces for operating git.

Dependency: git needs to be installed locally

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetHeadHash

func GetHeadHash() (sha string, err error)

func GetHeadHashShort

func GetHeadHashShort() (sha string, err error)

func GetLatestTag

func GetLatestTag() (string, error)

func GetLatestTagFromLocal added in v0.2.1

func GetLatestTagFromLocal() (tag string, err error)

func GetLatestTagFromRemote added in v0.2.1

func GetLatestTagFromRemote() (tag string, err error)

get latest tag from remote, the fitting git clone depth is 1

func GetRemoteUrl added in v0.2.1

func GetRemoteUrl() (string, error)

get remote url

func GetTagCommitSha

func GetTagCommitSha(tag string) (sha string, err error)

func GetTagCommitShaFromLocal added in v0.2.1

func GetTagCommitShaFromLocal(tag string) (sha string, err error)

func GetTagCommitShaFromRemote added in v0.2.1

func GetTagCommitShaFromRemote(tag string) (string, error)

get tag commit sha from remote, the fitting git clone depth is 1

func GetTagList

func GetTagList() (tags []string, err error)

func IsDirty

func IsDirty() (dirty bool, err error)

func IsHeadAtTag

func IsHeadAtTag(tag string) (bool, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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