MCPcopy Create free account
hub / github.com/belak/gitdir / Repository

Struct Repository

internal/git/repository.go:26–31  ·  view source on GitHub ↗

Repository is a fairly lightweight wrapper designed to attach a worktree to a git repository so we don't have to muck about with the raw git objects. We keep the worktree separate from the repo so we can still have a bare repo. This also lets us do fun things like keep the worktree in memory if we

Source from the content-addressed store, hash-verified

24// This also lets us do fun things like keep the worktree in memory if we really
25// want to.
26type Repository struct {
27 Repo *git.Repository
28 RepoFS *filesystem.Storage
29 Worktree *git.Worktree
30 WorktreeFS billy.Filesystem
31}
32
33// Open will open a repository if it exists.
34func Open(baseFS billy.Filesystem, path string) (*Repository, error) {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected