Versions in this module Expand all Collapse all v1 v1.0.0 Jun 22, 2023 Changes in this version + var ErrConfigNotFound = errors.New("config file not found") + var ErrIdxNotFound = errors.New("idx file not found") + var ErrIsDir = errors.New("reference path is a directory") + var ErrNotFound = errors.New("path not found") + var ErrPackedRefsBadFormat = errors.New("malformed packed-ref") + var ErrPackedRefsDuplicatedRef = errors.New("duplicated ref found in packed-ref file") + var ErrPackfileNotFound = errors.New("packfile not found") + var ErrSymRefTargetNotFound = errors.New("symbolic reference target not found") + type DotGit struct + func New(fs billy.Filesystem) *DotGit + func NewWithOptions(fs billy.Filesystem, o Options) *DotGit + func (d *DotGit) Alternates() ([]*DotGit, error) + func (d *DotGit) Close() error + func (d *DotGit) Config() (billy.File, error) + func (d *DotGit) ConfigWriter() (billy.File, error) + func (d *DotGit) CountLooseRefs() (int, error) + func (d *DotGit) DeleteOldObjectPackAndIndex(hash plumbing.Hash, t time.Time) error + func (d *DotGit) ForEachObjectHash(fun func(plumbing.Hash) error) error + func (d *DotGit) Fs() billy.Filesystem + func (d *DotGit) Index() (billy.File, error) + func (d *DotGit) IndexWriter() (billy.File, error) + func (d *DotGit) Initialize() error + func (d *DotGit) Module(name string) (billy.Filesystem, error) + func (d *DotGit) NewObject() (*ObjectWriter, error) + func (d *DotGit) NewObjectPack() (*PackWriter, error) + func (d *DotGit) Object(h plumbing.Hash) (billy.File, error) + func (d *DotGit) ObjectDelete(h plumbing.Hash) error + func (d *DotGit) ObjectPack(hash plumbing.Hash) (billy.File, error) + func (d *DotGit) ObjectPackIdx(hash plumbing.Hash) (billy.File, error) + func (d *DotGit) ObjectPacks() ([]plumbing.Hash, error) + func (d *DotGit) ObjectStat(h plumbing.Hash) (os.FileInfo, error) + func (d *DotGit) Objects() ([]plumbing.Hash, error) + func (d *DotGit) ObjectsWithPrefix(prefix []byte) ([]plumbing.Hash, error) + func (d *DotGit) PackRefs() (err error) + func (d *DotGit) Ref(name plumbing.ReferenceName) (*plumbing.Reference, error) + func (d *DotGit) Refs() ([]*plumbing.Reference, error) + func (d *DotGit) RemoveRef(name plumbing.ReferenceName) error + func (d *DotGit) SetRef(r, old *plumbing.Reference) error + func (d *DotGit) Shallow() (billy.File, error) + func (d *DotGit) ShallowWriter() (billy.File, error) + type EncodedObject struct + func NewEncodedObject(dir *DotGit, h plumbing.Hash, t plumbing.ObjectType, size int64) *EncodedObject + func (e *EncodedObject) Hash() plumbing.Hash + func (e *EncodedObject) Reader() (io.ReadCloser, error) + func (e *EncodedObject) SetSize(int64) + func (e *EncodedObject) SetType(plumbing.ObjectType) + func (e *EncodedObject) Size() int64 + func (e *EncodedObject) Type() plumbing.ObjectType + func (e *EncodedObject) Writer() (io.WriteCloser, error) + type ObjectWriter struct + func (w *ObjectWriter) Close() error + type Options struct + ExclusiveAccess bool + KeepDescriptors bool + type PackWriter struct + Notify func(plumbing.Hash, *idxfile.Writer) + func (w *PackWriter) Close() error + func (w *PackWriter) Write(p []byte) (int, error) + type RepositoryFilesystem struct + func NewRepositoryFilesystem(dotGitFs, commonDotGitFs billy.Filesystem) *RepositoryFilesystem + func (fs *RepositoryFilesystem) Chroot(path string) (billy.Filesystem, error) + func (fs *RepositoryFilesystem) Create(filename string) (billy.File, error) + func (fs *RepositoryFilesystem) Join(elem ...string) string + func (fs *RepositoryFilesystem) Lstat(filename string) (os.FileInfo, error) + func (fs *RepositoryFilesystem) MkdirAll(filename string, perm os.FileMode) error + func (fs *RepositoryFilesystem) Open(filename string) (billy.File, error) + func (fs *RepositoryFilesystem) OpenFile(filename string, flag int, perm os.FileMode) (billy.File, error) + func (fs *RepositoryFilesystem) ReadDir(path string) ([]os.FileInfo, error) + func (fs *RepositoryFilesystem) Readlink(link string) (string, error) + func (fs *RepositoryFilesystem) Remove(filename string) error + func (fs *RepositoryFilesystem) Rename(oldpath, newpath string) error + func (fs *RepositoryFilesystem) Root() string + func (fs *RepositoryFilesystem) Stat(filename string) (os.FileInfo, error) + func (fs *RepositoryFilesystem) Symlink(target, link string) error + func (fs *RepositoryFilesystem) TempFile(dir, prefix string) (billy.File, error)