git

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Apr 17, 2015 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Repository

type Repository struct {
	BasePath   string
	Path       string
	RemotePath string
	Name       string
}

Repository represents a Git repository.

func NewRepository

func NewRepository(basePath, remotePath string) *Repository

func (*Repository) Archive

func (repo *Repository) Archive(commit, spath string) (string, error)

archive git archive --format=tar.gz --prefix=wolffy-0.1.3/ 0.1.3 --output /tmp/wolffy-0.1.3.tag.gz

func (*Repository) Clone

func (repo *Repository) Clone() (string, error)

clone repository

func (*Repository) DelTags

func (repo *Repository) DelTags(commit string) error

delete local tags

func (*Repository) Diff

func (repo *Repository) Diff(commita, commitb string) (string, error)

diff

func (*Repository) GetBranches

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

list all branchs

func (*Repository) GetName

func (repo *Repository) GetName() string

get repository name

func (*Repository) GetTags

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

list all tags

func (*Repository) PullTags

func (repo *Repository) PullTags() error

pull tags

Jump to

Keyboard shortcuts

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