vcs

package
v1.0.12 Latest Latest
Warning

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

Go to latest
Published: Jul 5, 2021 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var GitClone = git.Clone

GitClone is required for stubbing

View Source
var GitNewRemote = git.NewRemote

GitNewRemote is required for stubbing

Functions

func Init

func Init(meta, data billy.Filesystem) error

Init a new Git project

Types

type Origin

type Origin struct {
	URL    string
	Branch string
}

Origin represents a remote git origin

type Project

type Project struct {
	Name        string
	AuthorName  string
	AuthorEmail string
	Remote      *Origin
}

Project represents a git repository

func (Project) Clone

func (p Project) Clone(meta, data billy.Filesystem) error

Clone repository from origin

func (Project) Commit

func (p Project) Commit(timestamp time.Time, meta, data billy.Filesystem) error

Commit to local repository

func (Project) Pull

func (p Project) Pull(meta, data billy.Filesystem) error

Pull from origin

func (Project) Push

func (p Project) Push(meta billy.Filesystem) error

Push to origin

Jump to

Keyboard shortcuts

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