Documentation ¶
Index ¶
- Constants
- func CatFile(name SHA) (io.Reader, error)
- func ScanLinesNoTrim(data []byte, atEOF bool) (advance int, token []byte, err error)
- func ScanNullLines(data []byte, atEOF bool) (advance int, token []byte, err error)
- func VerifyPack(pack io.ReadSeeker, idx io.Reader) ([]*packObject, error)
- type Blob
- type Commit
- type GitObject
- type Repository
- type SHA
- type Tree
Constants ¶
View Source
const ( OBJ_COMMIT packObjectType OBJ_TREE OBJ_BLOB OBJ_TAG OBJ_OFS_DELTA OBJ_REF_DELTA )
View Source
const (
RFC2822 = "Mon Jan 2 15:04:05 2006 -0700"
)
Variables ¶
This section is empty.
Functions ¶
func CatFile ¶
CatFile implements git cat-file for the command-line tool. Currently it supports only the -t fiag
func ScanLinesNoTrim ¶
ScanLinesNoTrim is exactly like bufio.ScanLines, except it does not trim the newline
func ScanNullLines ¶
ScanNullLines is like bufio.ScanLines, except it uses the null character as the delimiter instead of a newline
func VerifyPack ¶
func VerifyPack(pack io.ReadSeeker, idx io.Reader) ([]*packObject, error)
VerifyPack returns the pack objects contained in the packfile and corresponding index file.
Types ¶
type Blob ¶
type Blob struct { Contents []byte // contains filtered or unexported fields }
A Blob compresses content from a file
type Commit ¶
type Commit struct { Name SHA Tree string Parents []SHA Author string AuthorDate time.Time Committer string CommitterDate time.Time Message []byte // contains filtered or unexported fields }
type GitObject ¶
type GitObject interface {
Type() string
}
GitObject represents a commit, tree, or blob. Under the hood, these may be objects stored directly or through packfiles
type Repository ¶
Source Files ¶
Click to show internal directories.
Click to hide internal directories.