Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ObjectType ¶
type ObjectType int8
ObjectType is the type of an object within a packfile.
const ( InvalidObject ObjectType = 0 CommitObject ObjectType = 1 TreeObject ObjectType = 2 BlobObject ObjectType = 3 TagObject ObjectType = 4 // 5 reserved for future expansion OFSDeltaObject ObjectType = 6 REFDeltaObject ObjectType = 7 )
func (ObjectType) String ¶
func (ot ObjectType) String() string
String returns the string representation of the ObjectType.
func (ObjectType) Valid ¶
func (ot ObjectType) Valid() bool
Valid returns true if the ObjectType is a valid Git object type.
type Scanner ¶
type Scanner struct {
// contains filtered or unexported fields
}
Scanner iterates through the objects in a packfile, returning their type and decompressed data.
func NewScanner ¶
NewScanner creates a new Scanner for the given packfile data. The packfile data is not copied, so the caller must ensure it remains valid for the lifetime of the Scanner.
func (*Scanner) Object ¶
func (s *Scanner) Object() (ObjectType, []byte, error)
Object reads the next object from the packfile, returning its type and decompressed data.
Click to show internal directories.
Click to hide internal directories.