catfile

package
v0.52.1 Latest Latest
Warning

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

Go to latest
Published: Nov 23, 2017 License: MIT Imports: 10 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, repoPath string, 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