Documentation ¶
Overview ¶
Package repository implements functionality for git repositories.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ObjectFile ¶
ObjectFile defines the wire format for storing objects in the repository.
func ReadObjectFile ¶
func ReadObjectFile(r *bufio.Reader) (*ObjectFile, error)
ReadObjectFile reads an object file from a reader.
type Repository ¶
Repository represents a git repository.
func Find ¶
func Find(path string) (*Repository, error)
Find loads the repository at path or any of its parent directories.
func (*Repository) Find ¶
func (r *Repository) Find(name string, ot string, follow bool) string
Find resolves the given object reference.
func (*Repository) GitPath ¶
func (r *Repository) GitPath(ss ...string) string
GitPath returns the path to a file in the repository.
func (*Repository) LoadObject ¶
func (r *Repository) LoadObject(sha string, objectType string) (Object, error)
LoadObject loads an object from the repository.
func (*Repository) WriteObject ¶
func (r *Repository) WriteObject(of *ObjectFile) (string, error)
WriteObject writes the given object to the repository.
Click to show internal directories.
Click to hide internal directories.