git

package
v0.0.9 Latest Latest
Warning

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

Go to latest
Published: Feb 16, 2020 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrNoChanges indicates that there were no changes to commit
	ErrNoChanges = errors.New("no changes to commit")
)

Functions

This section is empty.

Types

type FakeRepo added in v0.0.7

type FakeRepo struct {
	CommitFn                 func(message string, files []core.ResourceFile) error
	CommitCallCount          int
	PushFn                   func() error
	PushCallCount            int
	ResetHardRemoteFn        func() error
	ResetHardRemoteCallCount int
}

func (*FakeRepo) Commit added in v0.0.7

func (fake *FakeRepo) Commit(message string, files []core.ResourceFile) error

func (*FakeRepo) Push added in v0.0.7

func (fake *FakeRepo) Push() error

func (*FakeRepo) ResetHardRemote added in v0.0.7

func (fake *FakeRepo) ResetHardRemote() error

type Repo added in v0.0.7

type Repo interface {
	Commit(message string, files []core.ResourceFile) error
	Push() error
	ResetHardRemote() error
}

func NewRepo added in v0.0.7

func NewRepo(repoSettings RepoSettings) (Repo, error)

NewRepo creates a new reference to a repo. There should only be one instance running per git folder. WARNING: any pending changes or local commits will be lost

type RepoSettings

type RepoSettings struct {
	URL         string
	Branch      string
	Username    string
	Password    string
	LocalGitDir string
	// contains filtered or unexported fields
}

Jump to

Keyboard shortcuts

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