Documentation
¶
Overview ¶
Package gogit reads bounded blobs from local Git repositories through go-git. It falls back to the git binary for object formats and repository layouts that go-git v5 cannot read.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Blob ¶
func Blob(ctx context.Context, dir, commit, blobPath string, maxBytes int64) (content []byte, binary, truncated bool, err error)
Blob reads path from commit through go-git. It caps content at maxBytes and reports whether the blob is binary or was truncated. It falls back to the git binary when go-git cannot read the repository.
func InspectBlob ¶
func InspectBlob(ctx context.Context, dir, commit, blobPath string, maxBytes int64) (clone.BlobResult, error)
InspectBlob reads path from commit through go-git and classifies the returned bytes. It falls back to the git binary when go-git cannot read the repository.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.