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
| 24 | // This also lets us do fun things like keep the worktree in memory if we really |
| 25 | // want to. |
| 26 | type 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. |
| 34 | func Open(baseFS billy.Filesystem, path string) (*Repository, error) { |
nothing calls this directly
no outgoing calls
no test coverage detected