Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrNotFound is returned by New when the path is not found. ErrNotFound = errors.New("path not found") // ErrIdxNotFound is returned by Idxfile when the idx file is not found on the // repository. ErrIdxNotFound = errors.New("idx file not found") // ErrPackfileNotFound is returned by Packfile when the packfile is not found // on the repository. ErrPackfileNotFound = errors.New("packfile not found") )
View Source
var ( // ErrPackedRefsDuplicatedRef is returned when a duplicated // reference is found in the packed-ref file. This is usually the // case for corrupted git repositories. ErrPackedRefsDuplicatedRef = errors.New("duplicated ref found in packed-ref file") // ErrPackedRefsBadFormat is returned when the packed-ref file // corrupt. ErrPackedRefsBadFormat = errors.New("malformed packed-ref") // ErrSymRefTargetNotFound is returned when a symbolic reference is // targeting a non-existing object. This usually means the // repository is corrupt. ErrSymRefTargetNotFound = errors.New("symbolic reference target not found") )
Functions ¶
This section is empty.
Types ¶
type GitDir ¶
type GitDir struct {
// contains filtered or unexported fields
}
The GitDir type represents a local git repository on disk. This type is not zero-value-safe, use the New function to initialize it.
func New ¶
New returns a GitDir value ready to be used. The path argument must be the absolute path of a git repository directory (e.g. "/foo/bar/.git").
func (*GitDir) Capabilities ¶
func (d *GitDir) Capabilities() (*common.Capabilities, error)
Capabilities scans the git directory collection capabilities, which it returns.
func (*GitDir) Idxfile ¶
Packfile returns the path of the idx file (really, it returns the path of the first file in the "objects/pack/" directory with an ".idx" extension.
Click to show internal directories.
Click to hide internal directories.