catfile

package
v0.87.0 Latest Latest
Warning

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

Go to latest
Published: Mar 1, 2018 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CatFile added in v0.19.0

func CatFile(ctx context.Context, repo *pb.Repository, handler Handler) error

CatFile fetches the tree entries information using git cat-file. It calls the handler with the TreeEntry slice, and an stdin reader and a stdout writer in case the handler wants to perform addition cat-file operations.

Types

type Handler added in v0.19.0

type Handler func(io.Writer, *bufio.Reader) error

Handler takes care of writing to stdin and reading from stdout of `git cat-file --batch`

type ObjectInfo

type ObjectInfo struct {
	Oid  string
	Type string
	Size int64
}

ObjectInfo represents a header returned by `git cat-file --batch`

func ParseObjectInfo

func ParseObjectInfo(stdout *bufio.Reader) (*ObjectInfo, error)

ParseObjectInfo reads and parses one header line from `git cat-file --batch`

Jump to

Keyboard shortcuts

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