git

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Feb 22, 2017 License: MIT Imports: 8 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Gateway

type Gateway struct {
	// contains filtered or unexported fields
}

Gateway is a git gateway.

func NewGateway

func NewGateway(startDir string) (*Gateway, error)

NewGateway builds a new Git gateway.

func (*Gateway) ApplyPatches

func (g *Gateway) ApplyPatches(patches string) error

ApplyPatches applies the given patch.

func (*Gateway) Checkout

func (g *Gateway) Checkout(name string) error

Checkout checks the given branch out.

func (*Gateway) CreateBranch

func (g *Gateway) CreateBranch(name, head string) error

CreateBranch creates a branch with the given name and head but does not check it out.

func (*Gateway) CreateBranchAndSwitch

func (g *Gateway) CreateBranchAndSwitch(name, head string) error

CreateBranchAndSwitch checks out a new branch with the given name and head.

func (*Gateway) CurrentBranch

func (g *Gateway) CurrentBranch() (string, error)

CurrentBranch determines the current branch name.

func (*Gateway) DeleteBranch

func (g *Gateway) DeleteBranch(name string) error

DeleteBranch deletes the given branch.

func (*Gateway) DeleteRemoteTrackingBranch

func (g *Gateway) DeleteRemoteTrackingBranch(remote, name string) error

DeleteRemoteTrackingBranch deletes the remote tracking branch with the given name.

func (*Gateway) DoesBranchExist

func (g *Gateway) DoesBranchExist(name string) bool

DoesBranchExist checks if this branch exists locally.

func (*Gateway) Fetch

func (g *Gateway) Fetch(req *gateway.FetchRequest) error

Fetch a git ref

func (*Gateway) Pull

func (g *Gateway) Pull(remote, name string) error

Pull pulls the given branch.

func (*Gateway) Push

func (g *Gateway) Push(req *gateway.PushRequest) error

Push a branch

func (*Gateway) PushMany added in v0.2.2

func (g *Gateway) PushMany(req *gateway.PushManyRequest) error

PushMany pushes multiple refs to a remote

func (*Gateway) Rebase added in v0.2.1

func (g *Gateway) Rebase(req *gateway.RebaseRequest) error

Rebase a branch.

func (*Gateway) RemoteURL

func (g *Gateway) RemoteURL(name string) (string, error)

RemoteURL gets the URL for the given remote.

func (*Gateway) ResetBranch added in v0.3.0

func (g *Gateway) ResetBranch(branch, head string) error

ResetBranch resets the given branch to the given head.

func (*Gateway) SHA1

func (g *Gateway) SHA1(ref string) (string, error)

SHA1 gets the SHA1 hash for the given ref.

Jump to

Keyboard shortcuts

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