gitop

package
v0.0.0-...-3ec049e Latest Latest
Warning

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

Go to latest
Published: Jul 22, 2021 License: MIT Imports: 14 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 {
	// contains filtered or unexported fields
}

func GetRepository

func GetRepository(project string, gitConfigs map[config.Repository]config.GitConfig) (r *Repository, err error)

FIXME GetRepository implicitly implies project equals repository. This is not a good practice, and it should be fixed in a good manner.

func (*Repository) AddFile

func (repo *Repository) AddFile(filenamePath string) error

AddFile add the file to the staging area of worktree

func (*Repository) Commit

func (repo *Repository) Commit(filename, caller, message string) error

Commit with username as slack caller name annotated by (Major Tom)

func (*Repository) GetFile

func (repo *Repository) GetFile(filenamePath string) (billy.File, error)

GetFile will return an billy.Filewith read and write permission

func (*Repository) GetHeadHash

func (repo *Repository) GetHeadHash() (plumbing.Hash, error)

GetHeadHash hard reset the worktree to the commit to clear changes

func (*Repository) HardResetToCommit

func (repo *Repository) HardResetToCommit(commit plumbing.Hash) error

HardResetToCommit hard reset the worktree to the commit to clear changes

func (*Repository) Pull

func (repo *Repository) Pull() error

func (*Repository) Push

func (repo *Repository) Push() error

Jump to

Keyboard shortcuts

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