Versions in this module Expand all Collapse all v0 v0.1.3 Jun 13, 2026 Changes in this version + type BlameLine struct + AuthorEmail string + AuthorName string + LineNum int + SHA string + Text string + When time.Time + type CreateBlobInput struct + Content []byte + type CreateBlobResult struct + SHA string + Size int64 + type CreateCommitInput struct + Author Signature + Committer Signature + Message string + Parents []string + Tree string + type CreateCommitResult struct + SHA string + type CreateTagInput struct + Message string + ObjectSHA string + ObjectType string + Tag string + Tagger Signature + type CreateTagResult struct + Message string + Object string + SHA string + Tag string + Tagger Signature + Type string + type CreateTreeEntry struct + Content []byte + Mode string + Path string + SHA string + Type ObjectType + type CreateTreeResult struct + Entries []TreeEntry + SHA string + type FileWriteInput struct + AuthorEmail string + AuthorName string + Branch string + CommitterEmail string + CommitterName string + Content []byte + Message string + ParentSHA string + Path string + When time.Time + type FileWriteResult struct + BlobSHA string + CommitSHA string + TreeSHA string + type GetTagResult struct + Message string + Object string + SHA string + Tag string + Tagger Signature + Type string type LogOpts + Author string + Committer string + Since *time.Time + Skip int + Until *time.Time type Repo + func (r *Repo) Blame(ref, path string) ([]BlameLine, error) + func (r *Repo) CommitPatch(sha string) (string, error) + func (r *Repo) CreateBlob(in CreateBlobInput) (*CreateBlobResult, error) + func (r *Repo) CreateCommit(in CreateCommitInput) (*CreateCommitResult, error) + func (r *Repo) CreateTag(in CreateTagInput) (*CreateTagResult, error) + func (r *Repo) CreateTree(baseTreeSHA string, entries []CreateTreeEntry) (*CreateTreeResult, error) + func (r *Repo) DeleteFile(in FileWriteInput) (*FileWriteResult, error) + func (r *Repo) GetTag(sha string) (*GetTagResult, error) + func (r *Repo) Release() + func (r *Repo) WriteFile(in FileWriteInput) (*FileWriteResult, error) type SHA + const EmptyTreeSHA type Store + func (s *Store) ArchiveStream(ctx context.Context, pk int64, format, prefix string, sha SHA, w io.Writer) error + func (s *Store) ChangedFilesDirect(ctx context.Context, pk int64, base, head SHA) ([]FileChange, error) + func (s *Store) ChangedFilesOpts(ctx context.Context, pk int64, base, head SHA, direct, ignoreWhitespace bool) ([]FileChange, error) + func (s *Store) CommitFiles(ctx context.Context, pk int64, sha SHA) (added, removed, modified []string, err error) + func (s *Store) CommitsBetweenN(ctx context.Context, pk int64, base, head SHA, limit int) ([]Commit, error) + func (s *Store) DiffDirect(ctx context.Context, pk int64, base, head SHA) ([]byte, error) + func (s *Store) ForkFrom(ctx context.Context, srcPK, dstPK int64, defaultBranch string, headOnly bool) error + func (s *Store) FormatPatchCommit(ctx context.Context, pk int64, sha SHA) ([]byte, error) + func (s *Store) InvalidateRepo(pk int64) + func (s *Store) LastCommitForPath(ctx context.Context, pk int64, rev, path string) (c Commit, ok bool, err error) + func (s *Store) PushCommits(ctx context.Context, pk int64, before, after SHA, limit int) ([]Commit, error) + func (s *Store) RegisterPath(pk int64, path string) v0.1.2 Jun 8, 2026 Changes in this version + var ErrBlobTooLarge = errors.New("git: blob exceeds size limit") type Store + func (s *Store) SetMaxBlobBytes(n int64) v0.1.1 Jun 6, 2026 Changes in this version type Store + func (s *Store) Close() v0.1.0 Jun 5, 2026 Changes in this version + var ErrEmptyRepository = errors.New("git: repository is empty") + var ErrNotFastForward = errors.New("git: update is not a fast-forward") + var ErrObjectNotFound = errors.New("git: object not found") + var ErrPathNotFound = errors.New("git: path not found") + var ErrRefExists = errors.New("git: reference already exists") + var ErrRefNotFound = errors.New("git: reference not found") + var ErrRepoNotFound = errors.New("git: repository not found") + type AnnotatedTag struct + Message string + SHA SHA + Tagger Signature + Target SHA + TargetType ObjectType + type Blob struct + Content []byte + SHA SHA + Size int64 + type Branch struct + Commit SHA + Name string + type Commit struct + Author Signature + Committer Signature + Message string + Parents []SHA + SHA SHA + Tree SHA + type FileChange struct + Additions int + Deletions int + Patch string + Path string + PrevPath string + SHA SHA + Status string + type LogOpts struct + From SHA + Max int + Path string + type MergeMethod string + const MergeCommit + const MergeRebase + const MergeSquash + type ObjectType string + const ObjectBlob + const ObjectCommit + const ObjectTag + const ObjectTree + type PathEntry struct + Mode string + Name string + Path string + SHA SHA + Size int64 + Type ObjectType + type PathResult struct + Dir []PathEntry + Entry PathEntry + File *Blob + IsDir bool + type Ref struct + Name string + Target SHA + Type ObjectType + type Repo struct + func (r *Repo) Blob(rev string) (Blob, error) + func (r *Repo) Branches() ([]Branch, error) + func (r *Repo) Commit(rev string) (Commit, error) + func (r *Repo) HEAD() (Branch, error) + func (r *Repo) Log(opts LogOpts) ([]Commit, error) + func (r *Repo) PathAt(rev, path string) (PathResult, error) + func (r *Repo) RefByName(name string) (Ref, error) + func (r *Repo) Refs() ([]Ref, error) + func (r *Repo) ResolveCommit(rev string) (SHA, error) + func (r *Repo) Tags() ([]Tag, error) + func (r *Repo) Tree(rev string, recursive bool) (Tree, error) + type SHA = string + type Signature struct + Email string + Name string + When time.Time + type Store struct + func NewStore(dir string) *Store + func (s *Store) AheadBehind(ctx context.Context, pk int64, base, head SHA) (ahead, behind int, err error) + func (s *Store) ChangedFiles(ctx context.Context, pk int64, base, head SHA) ([]FileChange, error) + func (s *Store) CommitsBetween(ctx context.Context, pk int64, base, head SHA) ([]Commit, error) + func (s *Store) CreateRef(ctx context.Context, pk int64, ref string, sha SHA) error + func (s *Store) DeleteRef(ctx context.Context, pk int64, ref string) error + func (s *Store) DiffRaw(ctx context.Context, pk int64, base, head SHA) ([]byte, error) + func (s *Store) DiffStat(ctx context.Context, pk int64, base, head SHA) (additions, deletions, changed int, err error) + func (s *Store) Dir(pk int64) string + func (s *Store) FormatPatch(ctx context.Context, pk int64, base, head SHA) ([]byte, error) + func (s *Store) Init(pk int64) (*Repo, error) + func (s *Store) IsAncestor(ctx context.Context, pk int64, ancestor, descendant SHA) (bool, error) + func (s *Store) Merge(ctx context.Context, pk int64, method MergeMethod, base, head SHA, ...) (sha SHA, ok bool, err error) + func (s *Store) MergeBase(ctx context.Context, pk int64, a, b SHA) (sha SHA, ok bool, err error) + func (s *Store) ObjectExists(ctx context.Context, pk int64, sha SHA) (bool, error) + func (s *Store) ObjectType(ctx context.Context, pk int64, sha SHA) (string, error) + func (s *Store) Open(pk int64) (*Repo, error) + func (s *Store) RefSHA(ctx context.Context, pk int64, ref string) (SHA, error) + func (s *Store) RefSnapshot(ctx context.Context, pk int64) (map[string]SHA, error) + func (s *Store) SetGitBin(bin string) + func (s *Store) TestMerge(ctx context.Context, pk int64, base, head SHA) (tree SHA, clean bool, err error) + func (s *Store) UpdateRef(ctx context.Context, pk int64, ref string, sha SHA, force bool) error + type Tag struct + Annotated *AnnotatedTag + Commit SHA + Name string + type Tree struct + Entries []TreeEntry + SHA SHA + Truncated bool + type TreeEntry struct + Mode string + Path string + SHA SHA + Size int64 + Type ObjectType