Documentation ¶
Overview ¶
Implements enough of the git format to read data out of an on-disk git repo.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrBadDelta = errors.New("bad delta")
View Source
var ErrBadIndex = errors.New("bad index format")
View Source
var ErrBadPack = errors.New("bad pack format")
View Source
var ErrInvalidRepo = errors.New("invalid repo")
View Source
var ErrNotBlob = errors.New("object is not a blob")
View Source
var ErrNotCommit = errors.New("ref is not a commit")
View Source
var ErrNotExist = errors.New("object does not exist")
View Source
var ErrNotFound = errors.New("object not found")
View Source
var ErrNotTree = errors.New("object is not a tree")
View Source
var ErrUnknownRef = errors.New("unknown ref")
View Source
var ErrUnknownType = errors.New("unknown type")
Functions ¶
This section is empty.
Types ¶
type LooseObject ¶
type LooseObject struct {
Base string
}
Implements reading objects out of the .git/objects directory
func (*LooseObject) Close ¶
func (l *LooseObject) Close() error
func (*LooseObject) LoadObject ¶
func (l *LooseObject) LoadObject(id string) (*Object, error)
type Object ¶
func ParseObject ¶
Read the data and construct a new Object
type Pack ¶
type Pack struct {
// contains filtered or unexported fields
}
Implements LoadObject for a pack file
type Repo ¶
func OpenRepo ¶
Open up a repository. Can be either normal or bare. Be sure to issue Close() on a repo when you're finished with it because that makes sure that any pack files used by the repo are properly unmapped.
Click to show internal directories.
Click to hide internal directories.