git

package
v1.12.3 Latest Latest
Warning

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

Go to latest
Published: Nov 8, 2020 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CloneORPullRepo

func CloneORPullRepo(url string, dst string) error

CloneORPullRepo

func CloneRepo

func CloneRepo(url string, dst string) (err error)

clone repo

func CloneRepoBranch

func CloneRepoBranch(branch string, url string, dst string) error

func GetTags

func GetTags(repoPath string, limit int) ([]string, error)

git tag

Types

type Repository

type Repository struct {
	Path string
}

Repository ...

func OpenRepository

func OpenRepository(repoPath string) (*Repository, error)

OpenRepository ...

func (*Repository) Export

func (repo *Repository) Export(startVer, endVer string, filename string) error

导出版本到tar包

func (*Repository) GetChangeFiles

func (repo *Repository) GetChangeFiles(startVer, endVer string, onlyFile bool) ([]string, error)

获取两个版本之间的差异文件列表

func (*Repository) GetChangeLogs

func (repo *Repository) GetChangeLogs(startVer, endVer string) ([]string, error)

获取两个版本之间的修改日志

func (*Repository) GetDiffFileCount

func (repo *Repository) GetDiffFileCount(startVer, endVer string) (int, error)

获取两个版本间的新增或修改的文件数量

func (*Repository) GetTags

func (repo *Repository) GetTags() ([]string, error)

获取tag列表

func (*Repository) Pull

func (repo *Repository) Pull() error

拉取代码

type SortTag

type SortTag struct {
	// contains filtered or unexported fields
}

SortTag ...

func (*SortTag) Len

func (t *SortTag) Len() int

Len ...

func (*SortTag) Less

func (t *SortTag) Less(i, j int) bool

Less ...

func (*SortTag) Sort

func (t *SortTag) Sort() []string

Sort ...

func (*SortTag) Swap

func (t *SortTag) Swap(i, j int)

Swap ...

Jump to

Keyboard shortcuts

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