git

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Dec 25, 2019 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetRepositoryCommits

func GetRepositoryCommits(r *git.Repository) ([]*object.Commit, error)

func GetRepositoryLastCommit

func GetRepositoryLastCommit(r *git.Repository) (*object.Commit, error)

func GetRepositoryNames

func GetRepositoryNames(root string) ([]string, error)

func GetRepositoryTree

func GetRepositoryTree(r *git.Repository, path string) (*object.Tree, error)

func OpenRepository

func OpenRepository(root, dirname string, strict bool) (*git.Repository, error)

OpenRepository opens a Git repository from the given root path and dirname. If strict is set to false, OpenRepository will try to open dirname first, then dirname with a ".git" suffix.

Types

type Blob added in v0.4.0

type Blob struct {
	Name     string
	IsBinary bool
	Size     string // The blob humanized size
	Reader   io.ReadCloser
}

func GetRepositoryBlob

func GetRepositoryBlob(r *git.Repository, path string) (*Blob, error)

type TreeObject

type TreeObject struct {
	Name   string
	IsFile bool
	Size   string // The object humanized size
}

func GetTreeObjects

func GetTreeObjects(tree *object.Tree) ([]*TreeObject, error)

Jump to

Keyboard shortcuts

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