Versions in this module Expand all Collapse all v0 v0.1.0 Mar 21, 2023 Changes in this version + const BranchPrefix + const DefaultLocale + const EmptySHA + const EmptyTreeSHA + const GitTimeLayout + const HookPathUpdate + const NotesRef + const PullPrefix + const PullRequestPrefix + const RemotePrefix + const RequiredVersion + const TagPrefix + var DefaultContext context.Context + var ErrBrokenCommand = errors.New("git command is broken") + var ErrNotValidHook = errors.New("not a valid Git hook") + var GitExecutable = "git" + var RepositoryContextKey = &contextKey + var SupportProcReceive bool + func AddChanges(repoPath string, all bool, files ...string) error + func AddChangesWithArgs(repoPath string, globalArgs []CmdArg, all bool, files ...string) error + func AllCommitsCount(ctx context.Context, repoPath string, hidePRRefs bool, files ...string) (int64, error) + func CheckGitVersionAtLeast(atLeast string) error + func Clone(ctx context.Context, from, to string, opts CloneRepoOptions) error + func CloneWithArgs(ctx context.Context, args []CmdArg, from, to string, opts CloneRepoOptions) (err error) + func CommitChanges(repoPath string, opts CommitChangesOptions) error + func CommitChangesWithArgs(repoPath string, args []CmdArg, opts CommitChangesOptions) error + func CommitsCount(ctx context.Context, repoPath string, revision ...string) (int64, error) + func CommitsCountFiles(ctx context.Context, repoPath string, revision, relpath []string) (int64, error) + func CommonCmdServEnvs() []string + func CommonGitCmdEnvs() []string + func ConcatenateError(err error, stderr string) error + func CutDiffAroundLine(originalDiff io.Reader, line int64, old bool, numbersOfLine int) (string, error) + func EnsureValidGitRepository(ctx context.Context, repoPath string) error + func Fsck(ctx context.Context, repoPath string, timeout time.Duration, args ...CmdArg) error + func GetAffectedFiles(repo *Repository, oldCommitID, newCommitID string, env []string) ([]string, error) + func GetDiffShortStat(ctx context.Context, repoPath string, args ...CmdArg) (numFiles, totalAdditions, totalDeletions int, err error) + func GetFullCommitID(ctx context.Context, repoPath, shortID string) (string, error) + func GetLastCommitForPaths(ctx context.Context, commit *Commit, treePath string, paths []string) (map[string]*Commit, error) + func GetLatestCommitTime(ctx context.Context, repoPath string) (time.Time, error) + func GetNote(ctx context.Context, repo *Repository, commitID string, note *Note) error + func GetRawDiff(repo *Repository, commitID string, diffType RawDiffType, writer io.Writer) error + func GetRemoteAddress(ctx context.Context, repoPath, remoteName string) (string, error) + func GetRemoteURL(ctx context.Context, repoPath, remoteName string) (*giturl.GitURL, error) + func GetRepoRawDiffForFile(repo *Repository, startCommit, endCommit string, diffType RawDiffType, ...) error + func GetReverseRawDiff(ctx context.Context, repoPath, commitID string, writer io.Writer) error + func HomeDir() string + func InitFull(ctx context.Context) (err error) + func InitRepository(ctx context.Context, repoPath string, bare bool) error + func InitSimple(ctx context.Context) error + func IsBranchExist(ctx context.Context, repoPath, name string) bool + func IsErrBadLink(err error) bool + func IsErrBranchNotExist(err error) bool + func IsErrExecTimeout(err error) bool + func IsErrMoreThanOne(err error) bool + func IsErrNotExist(err error) bool + func IsErrPushOutOfDate(err error) bool + func IsErrPushRejected(err error) bool + func IsErrUnsupportedVersion(err error) bool + func IsReferenceExist(ctx context.Context, repoPath, name string) bool + func IsRepoURLAccessible(ctx context.Context, url string) bool + func IsTagExist(ctx context.Context, repoPath, name string) bool + func IsValidHookName(name string) bool + func IsValidRefPattern(name string) bool + func IsValidSHAPattern(sha string) bool + func LogNameStatusRepo(ctx context.Context, repository, head, treepath string, paths ...string) (*bufio.Reader, func()) + func ParseBool(value string) (result, valid bool) + func ParseDiffHunkString(diffhunk string) (leftLine, leftHunk, rightLine, righHunk int) + func ParseTreeLine(rd *bufio.Reader, modeBuf, fnameBuf, shaBuf []byte) (mode, fname, sha []byte, n int, err error) + func Push(ctx context.Context, repoPath string, opts PushOptions) error + func ReadBatchLine(rd *bufio.Reader) (sha []byte, typ string, size int64, err error) + func ReadTagObjectID(rd *bufio.Reader, size int64) (string, error) + func ReadTreeID(rd *bufio.Reader, size int64) (string, error) + func RefEndName(refStr string) string + func RefURL(repoURL, ref string) string + func SanitizeRefPattern(name string) string + func SetExecutablePath(path string) error + func SetUpdateHook(repoPath, content string) (err error) + func SplitRefName(refStr string) (string, string) + func To40ByteSHA(sha, out []byte) []byte + func VersionInfo() string + func WalkGitLog(ctx context.Context, repo *Repository, head *Commit, treepath string, ...) (map[string]string, error) + func WalkReferences(ctx context.Context, repoPath string, walkfn func(sha1, refname string) error) (int, error) + func WriteCommitGraph(ctx context.Context, repoPath string) error + type ArchiveType int + const BUNDLE + const TARGZ + const ZIP + func (a ArchiveType) String() string + type BlamePart struct + Lines []string + Sha string + type BlameReader struct + func CreateBlameReader(ctx context.Context, repoPath, commitID, file string) (*BlameReader, error) + func (r *BlameReader) Close() error + func (r *BlameReader) NextPart() (*BlamePart, error) + type Blob struct + ID SHA1 + func (b *Blob) DataAsync() (io.ReadCloser, error) + func (b *Blob) GetBlobContent() (string, error) + func (b *Blob) GetBlobContentBase64() (string, error) + func (b *Blob) GetBlobLineCount() (int, error) + func (b *Blob) GuessContentType() (typesniffer.SniffedType, error) + func (b *Blob) Name() string + func (b *Blob) Size() int64 + type Branch struct + Name string + Path string + func GetBranchesByPath(ctx context.Context, path string, skip, limit int) ([]*Branch, int, error) + func (branch *Branch) GetCommit() (*Commit, error) + type CheckAttributeOpts struct + AllAttributes bool + Attributes []CmdArg + CachedOnly bool + Filenames []string + IndexFile string + WorkTree string + type CheckAttributeReader struct + Attributes []CmdArg + IndexFile string + Repo *Repository + WorkTree string + func (c *CheckAttributeReader) CheckPath(path string) (rs map[string]string, err error) + func (c *CheckAttributeReader) Close() error + func (c *CheckAttributeReader) Init(ctx context.Context) error + func (c *CheckAttributeReader) Run() error + type CloneRepoOptions struct + Bare bool + Branch string + Depth int + Filter string + Mirror bool + NoCheckout bool + Quiet bool + Shared bool + SkipTLSVerify bool + Timeout time.Duration + type CmdArg string + func AllowLFSFiltersArgs() []CmdArg + func CmdArgCheck(s string) CmdArg + type CodeActivityAuthor struct + Commits int64 + Email string + Name string + type CodeActivityStats struct + Additions int64 + AuthorCount int64 + Authors []*CodeActivityAuthor + ChangedFiles int64 + CommitCount int64 + CommitCountInAllBranches int64 + Deletions int64 + type Command struct + func NewCommand(ctx context.Context, args ...CmdArg) *Command + func NewCommandContextNoGlobals(ctx context.Context, args ...CmdArg) *Command + func NewCommandNoGlobals(args ...CmdArg) *Command + func (c *Command) AddArguments(args ...CmdArg) *Command + func (c *Command) AddDashesAndList(list ...string) *Command + func (c *Command) AddDynamicArguments(args ...string) *Command + func (c *Command) Run(opts *RunOpts) error + func (c *Command) RunStdBytes(opts *RunOpts) (stdout, stderr []byte, runErr RunStdError) + func (c *Command) RunStdString(opts *RunOpts) (stdout, stderr string, runErr RunStdError) + func (c *Command) SetDescription(desc string) *Command + func (c *Command) SetParentContext(ctx context.Context) *Command + func (c *Command) String() string + type Commit struct + Author *Signature + Branch string + CommitMessage string + Committer *Signature + ID SHA1 + Parents []SHA1 + Signature *CommitGPGSignature + func CommitFromReader(gitRepo *Repository, sha SHA1, reader io.Reader) (*Commit, error) + func (c *Commit) CacheCommit(ctx context.Context) error + func (c *Commit) CommitsBefore() ([]*Commit, error) + func (c *Commit) CommitsBeforeLimit(num int) ([]*Commit, error) + func (c *Commit) CommitsBeforeUntil(commitID string) ([]*Commit, error) + func (c *Commit) CommitsByRange(page, pageSize int) ([]*Commit, error) + func (c *Commit) CommitsCount() (int64, error) + func (c *Commit) FileChangedSinceCommit(filename, pastCommit string) (bool, error) + func (c *Commit) GetBranchName() (string, error) + func (c *Commit) GetCommitByPath(relpath string) (*Commit, error) + func (c *Commit) GetFileContent(filename string, limit int) (string, error) + func (c *Commit) GetFilesChangedSinceCommit(pastCommit string) ([]string, error) + func (c *Commit) GetRepositoryDefaultPublicGPGKey(forceUpdate bool) (*GPGSettings, error) + func (c *Commit) GetSubModule(entryname string) (*SubModule, error) + func (c *Commit) GetSubModules() (*ObjectCache, error) + func (c *Commit) GetTagName() (string, error) + func (c *Commit) HasFile(filename string) (bool, error) + func (c *Commit) HasPreviousCommit(commitHash SHA1) (bool, error) + func (c *Commit) LoadBranchName() (err error) + func (c *Commit) Message() string + func (c *Commit) Parent(n int) (*Commit, error) + func (c *Commit) ParentCount() int + func (c *Commit) ParentID(n int) (SHA1, error) + func (c *Commit) SearchCommits(opts SearchCommitsOptions) ([]*Commit, error) + func (c *Commit) Summary() string + type CommitChangesOptions struct + Author *Signature + Committer *Signature + Message string + type CommitFileStatus struct + Added []string + Modified []string + Removed []string + func GetCommitFileStatus(ctx context.Context, repoPath, commitID string) (*CommitFileStatus, error) + func NewCommitFileStatus() *CommitFileStatus + type CommitGPGSignature struct + Payload string + Signature string + type CommitInfo struct + Commit *Commit + Entry *TreeEntry + SubModuleFile *SubModuleFile + type CommitTreeOpts struct + AlwaysSign bool + KeyID string + Message string + NoGPGSign bool + Parents []string + type CompareInfo struct + BaseCommitID string + Commits []*Commit + HeadCommitID string + MergeBase string + NumFiles int + type DeleteBranchOptions struct + Force bool + type DivergeObject struct + Ahead int + Behind int + func GetDivergingCommits(ctx context.Context, repoPath, baseBranch, targetBranch string) (DivergeObject, error) + type Entries []*TreeEntry + func (tes Entries) CustomSort(cmp func(s1, s2 string) bool) + func (tes Entries) GetCommitsInfo(ctx context.Context, commit *Commit, treePath string) ([]CommitInfo, *Commit, error) + func (tes Entries) Sort() + type EntryMode int + const EntryModeBlob + const EntryModeCommit + const EntryModeExec + const EntryModeSymlink + const EntryModeTree + func ToEntryMode(value string) EntryMode + func (e EntryMode) String() string + type ErrBadLink struct + Message string + Name string + func (err ErrBadLink) Error() string + type ErrBranchNotExist struct + Name string + func (err ErrBranchNotExist) Error() string + func (err ErrBranchNotExist) Unwrap() error + type ErrExecTimeout struct + Duration time.Duration + func (err ErrExecTimeout) Error() string + type ErrMoreThanOne struct + Err error + StdErr string + StdOut string + func (err *ErrMoreThanOne) Error() string + type ErrNotExist struct + ID string + RelPath string + func (err ErrNotExist) Error() string + func (err ErrNotExist) Unwrap() error + type ErrPushOutOfDate struct + Err error + StdErr string + StdOut string + func (err *ErrPushOutOfDate) Error() string + func (err *ErrPushOutOfDate) Unwrap() error + type ErrPushRejected struct + Err error + Message string + StdErr string + StdOut string + func (err *ErrPushRejected) Error() string + func (err *ErrPushRejected) GenerateMessage() + func (err *ErrPushRejected) Unwrap() error + type ErrUnsupportedVersion struct + Required string + func (err ErrUnsupportedVersion) Error() string + type GPGSettings struct + Email string + KeyID string + Name string + PublicKeyContent string + Sign bool + func (gpgSettings *GPGSettings) LoadPublicKeyContent() error + type Hasher struct + func NewHasher(t ObjectType, size int64) Hasher + func (h Hasher) Sum() (sha1 SHA1) + type Hook struct + Content string + IsActive bool + Sample string + func GetHook(repoPath, name string) (*Hook, error) + func ListHooks(repoPath string) (_ []*Hook, err error) + func (h *Hook) Name() string + func (h *Hook) Update() error + type LastCommitCache struct + func NewLastCommitCache(count int64, repoPath string, gitRepo *Repository, cache cache.Cache) *LastCommitCache + func (c *LastCommitCache) Get(ref, entryPath string) (*Commit, error) + func (c *LastCommitCache) GetCommitByPath(commitID, entryPath string) (*Commit, error) + func (c *LastCommitCache) Put(ref, entryPath, commitID string) error + type LimitedReaderCloser struct + C io.Closer + N int64 + R io.Reader + func (l *LimitedReaderCloser) Close() error + func (l *LimitedReaderCloser) Read(p []byte) (n int, err error) + type LogNameStatusCommitData struct + CommitID string + ParentIDs []string + Paths []bool + type LogNameStatusRepoParser struct + func NewLogNameStatusRepoParser(ctx context.Context, repository, head, treepath string, paths ...string) *LogNameStatusRepoParser + func (g *LogNameStatusRepoParser) Close() + func (g *LogNameStatusRepoParser) Next(treepath string, paths2ids map[string]int, changed []bool, maxpathlen int) (*LogNameStatusCommitData, error) + type Note struct + Commit *Commit + Message []byte + type ObjectCache struct + func (oc *ObjectCache) Get(id string) (interface{}, bool) + func (oc *ObjectCache) Set(id string, obj interface{}) + type ObjectType string + const ObjectBlob + const ObjectBranch + const ObjectCommit + const ObjectTag + const ObjectTree + func (o ObjectType) Bytes() []byte + type PushOptions struct + Branch string + Env []string + Force bool + Mirror bool + Remote string + Timeout time.Duration + type RawDiffType string + const RawDiffNormal + const RawDiffPatch + type Reference struct + Name string + Object SHA1 + Type string + func (ref *Reference) Commit() (*Commit, error) + func (ref *Reference) RefGroup() string + func (ref *Reference) ShortName() string + type Repository struct + Ctx context.Context + LastCommitCache *LastCommitCache + Path string + func OpenRepository(ctx context.Context, repoPath string) (*Repository, error) + func RepositoryFromContext(ctx context.Context, path string) *Repository + func RepositoryFromContextOrOpen(ctx context.Context, path string) (*Repository, io.Closer, error) + func (repo *Repository) AddLastCommitCache(cacheKey, fullName, sha string) error + func (repo *Repository) AddObjectToIndex(mode string, object SHA1, filename string) error + func (repo *Repository) AddRemote(name, url string, fetch bool) error + func (repo *Repository) CatFileBatch(ctx context.Context) (WriteCloserError, *bufio.Reader, func()) + func (repo *Repository) CatFileBatchCheck(ctx context.Context) (WriteCloserError, *bufio.Reader, func()) + func (repo *Repository) CheckAttribute(opts CheckAttributeOpts) (map[string]map[string]string, error) + func (repo *Repository) CheckAttributeReader(commitID string) (*CheckAttributeReader, context.CancelFunc) + func (repo *Repository) Close() (err error) + func (repo *Repository) CommitTree(author, committer *Signature, tree *Tree, opts CommitTreeOpts) (SHA1, error) + func (repo *Repository) CommitsBetween(last, before *Commit) ([]*Commit, error) + func (repo *Repository) CommitsBetweenIDs(last, before string) ([]*Commit, error) + func (repo *Repository) CommitsBetweenLimit(last, before *Commit, limit, skip int) ([]*Commit, error) + func (repo *Repository) CommitsByFileAndRange(revision, file string, page int) ([]*Commit, error) + func (repo *Repository) CommitsCountBetween(start, end string) (int64, error) + func (repo *Repository) ConvertToSHA1(commitID string) (SHA1, error) + func (repo *Repository) CreateAnnotatedTag(name, message, revision string) error + func (repo *Repository) CreateArchive(ctx context.Context, format ArchiveType, target io.Writer, usePrefix bool, ...) error + func (repo *Repository) CreateBranch(branch, oldbranchOrCommit string) error + func (repo *Repository) CreateBundle(ctx context.Context, commit string, out io.Writer) error + func (repo *Repository) CreateTag(name, revision string) error + func (repo *Repository) DeleteBranch(name string, opts DeleteBranchOptions) error + func (repo *Repository) EmptyIndex() error + func (repo *Repository) FileBlame(revision, path, file string) ([]byte, error) + func (repo *Repository) FileChangedBetweenCommits(filename, id1, id2 string) (bool, error) + func (repo *Repository) FileCommitsCount(revision, file string) (int64, error) + func (repo *Repository) FilesCountBetween(startCommitID, endCommitID string) (int, error) + func (repo *Repository) GetAllCommitsCount() (int64, error) + func (repo *Repository) GetAnnotatedTag(sha string) (*Tag, error) + func (repo *Repository) GetBlob(idStr string) (*Blob, error) + func (repo *Repository) GetBranch(branch string) (*Branch, error) + func (repo *Repository) GetBranchCommit(name string) (*Commit, error) + func (repo *Repository) GetBranchCommitID(name string) (string, error) + func (repo *Repository) GetBranchNames(skip, limit int) ([]string, int, error) + func (repo *Repository) GetBranches(skip, limit int) ([]*Branch, int, error) + func (repo *Repository) GetCodeActivityStats(fromTime time.Time, branch string) (*CodeActivityStats, error) + func (repo *Repository) GetCommit(commitID string) (*Commit, error) + func (repo *Repository) GetCommitByPath(relpath string) (*Commit, error) + func (repo *Repository) GetCommitsFromIDs(commitIDs []string) []*Commit + func (repo *Repository) GetCompareInfo(basePath, baseBranch, headBranch string, directComparison, fileOnly bool) (_ *CompareInfo, err error) + func (repo *Repository) GetDefaultBranch() (string, error) + func (repo *Repository) GetDefaultPublicGPGKey(forceUpdate bool) (*GPGSettings, error) + func (repo *Repository) GetDiff(base, head string, w io.Writer) error + func (repo *Repository) GetDiffBinary(base, head string, w io.Writer) error + func (repo *Repository) GetDiffFromMergeBase(base, head string, w io.Writer) error + func (repo *Repository) GetDiffNumChangedFiles(base, head string, directComparison bool) (int, error) + func (repo *Repository) GetDiffOrPatch(base, head string, w io.Writer, patch, binary bool) error + func (repo *Repository) GetDiffShortStat(base, head string) (numFiles, totalAdditions, totalDeletions int, err error) + func (repo *Repository) GetFilesChangedBetween(base, head string) ([]string, error) + func (repo *Repository) GetHEADBranch() (*Branch, error) + func (repo *Repository) GetHook(name string) (*Hook, error) + func (repo *Repository) GetLanguageStats(commitID string) (map[string]int64, error) + func (repo *Repository) GetMergeBase(tmpRemote, base, head string) (string, string, error) + func (repo *Repository) GetPatch(base, head string, w io.Writer) error + func (repo *Repository) GetRefCommitID(name string) (string, error) + func (repo *Repository) GetRefType(ref string) ObjectType + func (repo *Repository) GetRefs() ([]*Reference, error) + func (repo *Repository) GetRefsBySha(sha, prefix string) ([]string, error) + func (repo *Repository) GetRefsFiltered(pattern string) ([]*Reference, error) + func (repo *Repository) GetTag(name string) (*Tag, error) + func (repo *Repository) GetTagCommit(name string) (*Commit, error) + func (repo *Repository) GetTagCommitID(name string) (string, error) + func (repo *Repository) GetTagID(name string) (string, error) + func (repo *Repository) GetTagInfos(page, pageSize int) ([]*Tag, int, error) + func (repo *Repository) GetTagNameBySHA(sha string) (string, error) + func (repo *Repository) GetTagType(id SHA1) (string, error) + func (repo *Repository) GetTagWithID(idStr, name string) (*Tag, error) + func (repo *Repository) GetTags(skip, limit int) (tags []string, err error) + func (repo *Repository) GetTree(idStr string) (*Tree, error) + func (repo *Repository) HashObject(reader io.Reader) (SHA1, error) + func (repo *Repository) Hooks() ([]*Hook, error) + func (repo *Repository) IsBranchExist(name string) bool + func (repo *Repository) IsCommitExist(name string) bool + func (repo *Repository) IsCommitInBranch(commitID, branch string) (r bool, err error) + func (repo *Repository) IsEmpty() (bool, error) + func (repo *Repository) IsObjectExist(name string) bool + func (repo *Repository) IsReferenceExist(name string) bool + func (repo *Repository) IsTagExist(name string) bool + func (repo *Repository) LineBlame(revision, path, file string, line uint) (*Commit, error) + func (repo *Repository) LsFiles(filenames ...string) ([]string, error) + func (repo *Repository) LsTree(ref string, filenames ...string) ([]string, error) + func (repo *Repository) ReadPatchCommit(prID int64) (commitSHA string, err error) + func (repo *Repository) ReadTreeToIndex(treeish string, indexFilename ...string) error + func (repo *Repository) ReadTreeToTemporaryIndex(treeish string) (filename, tmpDir string, cancel context.CancelFunc, err error) + func (repo *Repository) RemoveFilesFromIndex(filenames ...string) error + func (repo *Repository) RemoveReference(name string) error + func (repo *Repository) RemoveRemote(name string) error + func (repo *Repository) RenameBranch(from, to string) error + func (repo *Repository) ResolveReference(name string) (string, error) + func (repo *Repository) SetDefaultBranch(name string) error + func (repo *Repository) SetReference(name, commitID string) error + func (repo *Repository) WalkReferences(refType ObjectType, skip, limit int, walkfn func(sha1, refname string) error) (int, error) + func (repo *Repository) WriteTree() (*Tree, error) + type RunOpts struct + Dir string + Env []string + PipelineFunc func(context.Context, context.CancelFunc) error + Stderr io.Writer + Stdin io.Reader + Stdout io.Writer + Timeout time.Duration + UseContextTimeout bool + type RunStdError interface + IsExitCode func(code int) bool + Stderr func() string + Unwrap func() error + type SHA1 [20]byte + func ComputeBlobHash(content []byte) SHA1 + func ComputeHash(t ObjectType, content []byte) SHA1 + func MustID(b []byte) SHA1 + func MustIDFromString(s string) SHA1 + func NewID(b []byte) (SHA1, error) + func NewIDFromString(s string) (SHA1, error) + func (s SHA1) IsZero() bool + func (s SHA1) String() string + type SearchCommitsOptions struct + After string + All bool + Authors []string + Before string + Committers []string + Keywords []string + func NewSearchCommitsOptions(searchString string, forAllRefs bool) SearchCommitsOptions + type Signature struct + Email string + Name string + When time.Time + func (s *Signature) Decode(b []byte) + func (s *Signature) String() string + type SubModule struct + Name string + URL string + type SubModuleFile struct + func NewSubModuleFile(c *Commit, refURL, refID string) *SubModuleFile + func (sf *SubModuleFile) RefID() string + func (sf *SubModuleFile) RefURL(urlPrefix, repoFullName, sshDomain string) string + type Tag struct + ID SHA1 + Message string + Name string + Object SHA1 + Signature *CommitGPGSignature + Tagger *Signature + Type string + func (tag *Tag) Commit(gitRepo *Repository) (*Commit, error) + type Tree struct + ID SHA1 + ResolvedID SHA1 + func NewTree(repo *Repository, id SHA1) *Tree + func (t *Tree) GetBlobByPath(relpath string) (*Blob, error) + func (t *Tree) GetTreeEntryByPath(relpath string) (*TreeEntry, error) + func (t *Tree) ListEntries() (Entries, error) + func (t *Tree) ListEntriesRecursiveFast() (Entries, error) + func (t *Tree) ListEntriesRecursiveWithSize() (Entries, error) + func (t *Tree) SubTree(rpath string) (*Tree, error) + type TreeEntry struct + ID SHA1 + func ParseTreeEntries(data []byte) ([]*TreeEntry, error) + func (te *TreeEntry) Blob() *Blob + func (te *TreeEntry) FollowLink() (*TreeEntry, error) + func (te *TreeEntry) FollowLinks() (*TreeEntry, error) + func (te *TreeEntry) GetSubJumpablePathName() string + func (te *TreeEntry) IsDir() bool + func (te *TreeEntry) IsExecutable() bool + func (te *TreeEntry) IsLink() bool + func (te *TreeEntry) IsRegular() bool + func (te *TreeEntry) IsSubModule() bool + func (te *TreeEntry) Mode() EntryMode + func (te *TreeEntry) Name() string + func (te *TreeEntry) Size() int64 + func (te *TreeEntry) Type() string + type WriteCloserError interface + CloseWithError func(err error) error + func CatFileBatch(ctx context.Context, repoPath string) (WriteCloserError, *bufio.Reader, func()) + func CatFileBatchCheck(ctx context.Context, repoPath string) (WriteCloserError, *bufio.Reader, func())