easyrepo

package
v0.0.0-...-100be9c Latest Latest
Warning

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

Go to latest
Published: May 7, 2018 License: BSD-2-Clause Imports: 4 Imported by: 0

Documentation

Overview

Easy Repo

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateBranch

func CreateBranch(repo *git.Repository, parentHash, name string) (*git.Branch, error)

func CreateBranchFromCommit

func CreateBranchFromCommit(repo *git.Repository, parent *git.Commit, name string) (*git.Branch, error)

func CreateCommit

func CreateCommit(repo *git.Repository, branch string, c *Commit) (*git.Oid, error)

func CreateFirstCommit

func CreateFirstCommit(repo *git.Repository, c *Commit) (*git.Oid, error)

func CreateRepo

func CreateRepo(path string) (*git.Repository, error)

func DeleteBranch

func DeleteBranch(repo *git.Repository, branch string) error

func DeleteRepo

func DeleteRepo(path string) error

func GetCommit

func GetCommit(repo *git.Repository, hash string) (*git.Commit, error)

func GetHead

func GetHead(repo *git.Repository, branch string) (*git.Commit, error)

func MergeBranches

func MergeBranches(repo *git.Repository, ours, theirs string) (string, error)

func OpenRepo

func OpenRepo(path string) (*git.Repository, error)

Types

type Commit

type Commit struct {
	Parent   string
	Filename string
	Body     []byte
	Msg      string
	Sig      *git.Signature
}

func GetEasyCommit

func GetEasyCommit(repo *git.Repository, c *git.Commit, filename string) (*Commit, error)

func GetEasyCommitByHash

func GetEasyCommitByHash(repo *git.Repository, hash, filename string) (*Commit, error)

func GetHeadBody

func GetHeadBody(repo *git.Repository, branch, filename string) (*Commit, error)

type DiffResponse

type DiffResponse struct {
	Body string
}

func DiffCommits

func DiffCommits(repo *git.Repository, ours, theirs string) (*DiffResponse, error)

Jump to

Keyboard shortcuts

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