MCPcopy Create free account
hub / github.com/libgit2/git2go / newRepositoryFromC

Function newRepositoryFromC

repository.go:45–59  ·  view source on GitHub ↗
(ptr *C.git_repository)

Source from the content-addressed store, hash-verified

43}
44
45func newRepositoryFromC(ptr *C.git_repository) *Repository {
46 repo := &Repository{ptr: ptr}
47
48 repo.Remotes.repo = repo
49 repo.Remotes.remotes = make(map[*C.git_remote]*Remote)
50 repo.Submodules.repo = repo
51 repo.References.repo = repo
52 repo.Notes.repo = repo
53 repo.Tags.repo = repo
54 repo.Stashes.repo = repo
55
56 runtime.SetFinalizer(repo, (*Repository).Free)
57
58 return repo
59}
60
61func OpenRepository(path string) (*Repository, error) {
62 cpath := C.CString(path)

Callers 9

OpenRepositoryFunction · 0.85
OpenRepositoryExtendedFunction · 0.85
InitRepositoryFunction · 0.85
NewRepositoryWrapOdbFunction · 0.85
OwnerMethod · 0.85
CloneFunction · 0.85
remoteCreateCallbackFunction · 0.85
OwnerMethod · 0.85
OpenMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…