git

package
v0.0.0-...-8335c39 Latest Latest
Warning

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

Go to latest
Published: Sep 28, 2019 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CurrentBranch

func CurrentBranch(projectRoot string) (string, error)

func GetVersion

func GetVersion() string

Types

type CloneOptions

type CloneOptions struct {
	Bare      bool
	Depth     uint64
	Submodule bool
	Commit    string
}

type HostKeyError

type HostKeyError string

func (HostKeyError) Error

func (s HostKeyError) Error() string

type RawCommit

type RawCommit struct {
	SHA         string
	AuthorDate  time.Time
	AuthorEmail string
	AuthorName  string
	Signed      string
	Message     string
}

type RawRepository

type RawRepository struct {
	Repository *Repository
	Directory  string
	sync.RWMutex
}

func Clone

func Clone(
	r *Repository,
	cloneOpts *CloneOptions,
	directory string,
	writer io.Writer,
) (*RawRepository, error)

func (*RawRepository) Checkout

func (r *RawRepository) Checkout(ref string) error

func (*RawRepository) Clean

func (r *RawRepository) Clean() error

func (*RawRepository) GetCommitInfo

func (r *RawRepository) GetCommitInfo(sha string) (*RawCommit, error)

func (*RawRepository) GetCurrentCommitInfo

func (r *RawRepository) GetCurrentCommitInfo() (*RawCommit, error)

func (*RawRepository) GetDefaultBranch

func (r *RawRepository) GetDefaultBranch() (string, error)

func (*RawRepository) GetDescribe

func (r *RawRepository) GetDescribe() string

func (*RawRepository) GetDescribeAll

func (r *RawRepository) GetDescribeAll() string

func (*RawRepository) GetTotalCommits

func (r *RawRepository) GetTotalCommits() uint64

func (*RawRepository) IsDirty

func (r *RawRepository) IsDirty() bool

type Repository

type Repository struct {
	Address    string        `json:"address"`
	PrivateKey string        `json:"privateKey"`
	PublicKey  ssh.PublicKey `json:"-"`
	Agent      agent.Agent   `json:"-"`
}

type SSHKeyError

type SSHKeyError string

func (SSHKeyError) Error

func (s SSHKeyError) Error() string

Jump to

Keyboard shortcuts

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